I have a @HTML.ActionLink in my Razor view and I'd like for it to call a Post action method rather than a Get one.
Is this possible?
If you are using bootstrap you can easily make a button look like a link by applying the btn-link class, for example
<input type="submit" name="ActionType" value="Edit" class="col-md-1 btn btn-link" />
If you want to invoke POST action, put this link inside form which uses POST action, or use ajax version. You can find some more details here.
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