internal static String ResolveClientUrlSimple(string relativeUrl)
{
if (relativeUrl == null)
{
throw new ArgumentNullException("relativeUrl");
}
if (relativeUrl.Length == 0) return relativeUrl;
if (relativeUrl.StartsWith("~"))
{
string text1 = HttpContext.Current.Request.ApplicationPath;
if (text1.Length == 0)
{
return relativeUrl;
}
text1 = text1 + relativeUrl.TrimStart('~');
if (text1.IndexOf("//") > -1)
text1 = text1.Replace("//", "/");
return text1;
}
return relativeUrl;
}
联系客服