Retrieve the application path
string appPath = HttpContext.Current.Request.ApplicationPath;
Convert virtual application path to a physical path
string physicalPath = HttpContext.Current.Request.MapPath(appPath);
OR
OR
System.Web.HttpContext.Current.Server.MapPath("~/")
No comments:
Post a Comment