protected System.Web.UI.HtmlControls.HtmlInputFile fileAttachment;
protected string strFileName, strFile;
strFileName = this.fileAttachment.PostedFile.FileName;
strFileName = Path.GetFileName(strFileName);
strFile = strBaseDirectory + strFileName;
strFileDisplay = "../backup/upload/" + strFileName;
fileAttachment.PostedFile.SaveAs(strFile);
The correct path is
http://localhost/Gallery/backup/upload/tty.jpg
However, when I see the strFileDisplay, it is
http://localhost/backup/upload/tty.jpg
Gallery is the virtual directory under IIS's default website.
How should I fix it?
...
Go to the complete details ...