G
Guest
i have very strange problem in a Directory C:\Images I'm checking if an image
is exist then copy it to other folder using following code:
if(FilePath.Trim().Length == 0)
return String.Empty;
string fileName = System.IO.Path.GetFileName(FilePath);
string path = Server.MapPath("images\\LogInPageImages") + "\\" + fileName;
if(System.IO.File.Exists(FilePath))
//here Exist return false though file exist in folder ...WHY?
System.IO.File.Copy(FilePath,path,true);
return @"images\LogInPageImages\" + fileName ;
is exist then copy it to other folder using following code:
if(FilePath.Trim().Length == 0)
return String.Empty;
string fileName = System.IO.Path.GetFileName(FilePath);
string path = Server.MapPath("images\\LogInPageImages") + "\\" + fileName;
if(System.IO.File.Exists(FilePath))
//here Exist return false though file exist in folder ...WHY?
System.IO.File.Copy(FilePath,path,true);
return @"images\LogInPageImages\" + fileName ;