How do I find the absolute url of an action in ASP.NET MVC?

I need to do something like this:

<script type="text/javascript">
    token_url = "http://example.com/your_token_url";
</script>

I’m using the Beta version of MVC, but I can’t figure out how to get the absolute url of an action. I’d like to do something like this:

<%= Url.AbsoluteAction("Action","Controller")) %>

Is there a helper or Page method for this?

9 Answers
9

Leave a Comment