I need to generate some URLs in a model in ASP.NET MVC. I'd like to call something like UrlHelper.Action() which uses the routes to generate the URL. I don't mind filling the usual blanks, like the hostname, scheme and so on.
Is there any method I can call for that? Is there a way to construct an UrlHelper?
Anonymous User
22-Nov-2014I like Omar's answer but that's not working for me. Just for the record this is the solution I'm using now: