Skip to content

Instantly share code, notes, and snippets.

@timiles
Created June 1, 2012 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timiles/2851789 to your computer and use it in GitHub Desktop.
Save timiles/2851789 to your computer and use it in GitHub Desktop.
Url.AbsoluteAction helper
public static string AbsoluteAction(this UrlHelper url,
string actionName, string controllerName, object routeValues = null, bool isHttps = false)
{
return url.Action(actionName, controllerName, routeValues, "http" + (isHttps ? "s" : ""));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment