Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VirtualPathUtility.ToAbsolute("~/url/");
- public static string CustomImage(this HtmlHelper html)
- {
- var Url = new UrlHelper(html.ViewContext.RequestContext);
- }
- public static string MyHelper(this HtmlHelper h)
- {
- string url = h.ViewContext.HttpContext.Request.Url.AbsoluteUri;
- }
- string relativePath =
- VirtualPathUtility.MakeRelative(Request.RawUrl, "~/myFolder/myImage.png");
- string fullUrl = HttpContext.Current.Request.Url.AbsoluteUri;
Add Comment
Please, Sign In to add comment