MVC3 Html.ActionLink Post

前端 未结 3 995
后悔当初
后悔当初 2020-12-19 05:56

I have an MVC3 C#.NET web app and need to call a view using Html.ActionLink. I can\'t tell from the documentation if I can specify the POST or GET. Below is my HTML, is th

3条回答
  •  别那么骄傲
    2020-12-19 06:16

    If you want a post use Ajax.ActionLink but be aware it's an Ajax post. You could easily use jquery to cause your existing link to cause a form post but this functionality is not included in Html.ActionLink.

    See ASP.NET MVC ActionLink and post method

提交回复
热议问题