public static GetAbsoluteUrl ( this httpReq, string url ) : string | ||
httpReq | this | |
url | string | |
return | string |
public static string GetAbsoluteUrl(this IRequest httpReq, string url)
{
if (url?.SafeSubstring(0, 2) == "~/")
{
url = httpReq.GetBaseUrl().CombineWith(url.Substring(2));
}
return url;
}