Problem with relative path in System.file.io of asp.net
问题 I'm storing the file path in the database as ~/FolderName/FileName and when i try to open the file using System.IO.FileInfo(filePath) in this manner. It is not able to decipher the file path. Moreover i'm using this statement in a class DownloadFile, so i'm not able to use Page.Server.MapPath. Is there a work around for this problem. These are the following lines of code that i'm using: if (dr1.Read()) { String filePath = dr1[0].ToString(); HttpContext.Current.Response.ContentType =