I want to use normal HTML Button to call Controller in ASP.NET MVC2, instead of ActionLink, is that possible?
Sure, just use Url.Action() to render the URL to the action.
<a href="<%= Url.Action("Action") %>">BLA BLA</a>
or
<button onclick="javascript: window.location = '<%= Ajax.JavascriptEncode(Url.Action("Action")) %> '">Click me</button>
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