Hi,
I want that picture that user upload saved in a folder in my project root directory. I write following code:
if (imgpasvand == "jpg" || imgpasvand == "png" || imgpasvand == "gif")
{
string[] path = Directory.GetFiles(Server.MapPath(@"~\SlideShow Images\"));
int i = 0;
foreach (var item in path)
{
if (path[i].Contains("4"))
{
FileInfo file = new FileInfo(path[i]);
file.Delete();
}
i++;
}
//
string imgpath = @"~\SlideShow Images\4" + "." + imgpasvand;
...
Go to the complete details ...