I don't need a Link but rather only the href= part of the ActionLink.
But if I call Html.ActionLink(...) I get a back. Is there a way to just return the URL of the Action while not getting the ?
MVC also provides a UrlHelper class which can do the same thing:
<%=Url.Action(actionName)%>
<%=Url.Action(actionName, htmlValues)%>
<%=Url.Action(actionName, controllerName, htmlValues)%>
Edit: in response to commment, now including parameters:
<% =Html.BuildUrlFromExpression<YourController>(c => c.YourAction(parameter)) %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With