public static string UrlScheme
{
get
{
return System.Web.HttpContext.Current.Request.Url.Scheme + "://";
}
}
public static string AppUrl
{
get
{
if (!String.IsNullOrEmpty(_AppUrl))
{
return _AppUrl;
}
else
{
string Url = UrlScheme + System.Web.HttpContext.Current.Request.Url.Authority + System.Web.HttpContext.Current.Request.ApplicationPath;
Url = Url.TrimEnd('/');
return Url;
}
}
}
private static string _AppUrl;
{
get
{
return System.Web.HttpContext.Current.Request.Url.Scheme + "://";
}
}
public static string AppUrl
{
get
{
if (!String.IsNullOrEmpty(_AppUrl))
{
return _AppUrl;
}
else
{
string Url = UrlScheme + System.Web.HttpContext.Current.Request.Url.Authority + System.Web.HttpContext.Current.Request.ApplicationPath;
Url = Url.TrimEnd('/');
return Url;
}
}
}
private static string _AppUrl;
本文转自94cool博客园博客,原文链接:http://www.cnblogs.com/94cool/archive/2010/03/21/1691087.html,如需转载请自行联系原作者