/// <summary> /// 解析相对Url /// </summary> /// <param name="relativeUrl">相对Url</param> public static string ResolveUrl(string relativeUrl) { if (string.IsNullOrWhiteSpace(relativeUrl)) return string.Empty; relativeUrl = relativeUrl.Replace("\", "/"); if (relativeUrl.StartsWith("/")) return relativeUrl; if (relativeUrl.Contains("://")) return relativeUrl; return VirtualPathUtility.ToAbsolute(relativeUrl); }