Static ASP.Net methods for paths
VirtualPathUtility.ToAbsolute("~/") = /Site/
HostingEnvironment.MapPath("~/") = c:\InetPub\wwwroot\Site\.
new Uri(HttpContext.Current.Request.Url,VirtualPathUtility.ToAbsolute("~/")).AbsoluteUri = http://server/Site/
Comments
Be the first to post a comment