public static string WebsiteRootUrl
{
get
{
string strAppPath;
if (HttpContext.Current.Request.ApplicationPath != "/")
strAppPath = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) + HttpContext.Current.Request.ApplicationPath;
else
strAppPath = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority);
return strAppPath + "/";
}
}
{
get
{
string strAppPath;
if (HttpContext.Current.Request.ApplicationPath != "/")
strAppPath = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) + HttpContext.Current.Request.ApplicationPath;
else
strAppPath = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority);
return strAppPath + "/";
}
}
Comments