views:

106

answers:

1

Hi!

This should be simple. I want to get an absolute Uri given the controller, action and other routevalues. In other words I want to do what Html.ActionLink does but without the anchor and I want to do it in my controller.

A: 

You can generate link URLs with UrlHelper.Action(). Your controllers already have this as property Url.

Url.Action("Logout", "AccountController")
Lachlan Roche
Great. The UrlHelper needed a RequestContext which I got from ControllerContext.
Martin