I have a controller named "AccountController" and action called "ResetPassword". From the html markup I can do something like:
<%= Html.ActionLink("LinkText", "ResetPassword", "AccountController") %>
and it will output the correct url. Is there a way to do this programmatically? I am trying to get the url as a string in another class but System.Web.Mvc.HtmlHelper doesn't have an ActionLink() static method and creating an instance of the class doesn't have it either.
Note: If I try to create instances of HtmlHelper or UrlHelper I then need references to the View Context or Request Context and I can't figure out how to get those from the controller (to pass in to my class method)