Inside of a View can I get a full route information to an action?
If I have an action called DoThis in a controller MyController. Can I get to a path of "/MyController/DoThis/"
?
You mean like using the Action method on the Url helper:
<%= Url.Action("DoThis", "MyController") %>
or in Razor:
@Url.Action("DoThis", "MyController")
which will give you a relative url (/MyController/DoThis
).
And if you wanted to get an absolute url (http://localhost:8385/MyController/DoThis
):
<%= Url.Action("DoThis", "MyController", null, Request.Url.Scheme, null) %>