Is it possible using Html.ActionLink
send request to HttpPost
action on mvc controller?
Asked
Active
Viewed 3,153 times
0

user1765862
- 13,635
- 28
- 115
- 220
-
possible duplicate of [MVC3 Html.ActionLink Post](http://stackoverflow.com/questions/8421074/mvc3-html-actionlink-post) – teo van kot Apr 28 '15 at 06:27
-
possible duplicate of [ASP.NET MVC ActionLink and post method](http://stackoverflow.com/questions/2048778/asp-net-mvc-actionlink-and-post-method) – Mohsen Esmailpour Apr 28 '15 at 06:34
-
1Why would you want that? A POST action has consequences and that's why we let the user access them through forms and not links. If someone takes the URL produced by your action link, obfuscates it and sends it to a user of your application, it could have bad unintended consequences if that user clicks on it. – Theodoros Chatzigiannakis Apr 28 '15 at 06:42
1 Answers
0
"You can't use an ActionLink because that just renders an anchor tag. You can use a JQuery AJAX post, see http://docs.jquery.com/Ajax/jQuery.post or just call the form's submit method with or without JQuery (which would be non-AJAX), perhaps in the onclick event of whatever control takes your fancy."