I have found to get physical path from different way.
1) On .aspx.cs Page
string path = Server.MapPath("/");
2) On Class File (.CS) Page
String Path = HttpContext.Current.Server.MapPath("/");
3) If you are using Thread and want to get physical path in .CS or .asax file
String Path = HttpContext.AppDomainAppPath.Replace("//","\\");
0 comments:
Post a Comment