MVC3 @Html.ActionLink有没有可能实施Post 提交

MVC3 @Html.ActionLink有没有可能执行Post 提交
MVC3   @Html.ActionLink有没有可能实施Post  提交

------解决方案--------------------
只要你@Html.ActionLink 标签所处的表单提交方式为Post

或者直接在onclick中直接post表单

最终解析为a标签,那么你可以当做普通的a处理

<a href="javascript:$('#Form').submit();"
------解决方案--------------------
引用:
Quote: 引用:

只要你@Html.ActionLink 标签所处的表单提交方式为Post

或者直接在onclick中直接post表单

最终解析为a标签,那么你可以当做普通的a处理

<a href="javascript:$('#Form').submit();"

那个actionlink 是在@using (Html.BeginForm())这个里面的,也就是有提交吧?
为什么我执行代码在action里面断点都没进去PSOT
  [HttpPost]
        public ActionResult Article_List()

默认的链接点击是url传递,是get方式
一楼是让你改成onclick事件触发
------解决方案--------------------
关注点分离一下
1.@Html.ActionLink 只是渲染了一个<a></a>其他它并不管.
2.既然是a标签,那么你应该问怎样使用a标签提交一个POST请求
3.回答:你可以使用Javascript来完成.
------解决方案--------------------
引用:
Quote: 引用:

Quote: 引用:

Quote: 引用:

只要你@Html.ActionLink 标签所处的表单提交方式为Post

或者直接在onclick中直接post表单

最终解析为a标签,那么你可以当做普通的a处理

<a href="javascript:$('#Form').submit();"

那个actionlink 是在@using (Html.BeginForm())这个里面的,也就是有提交吧?
为什么我执行代码在action里面断点都没进去PSOT
  [HttpPost]
        public ActionResult Article_List()

默认的链接点击是url传递,是get方式
一楼是让你改成onclick事件触发

那actionlink 应该怎么改?
@Html.ActionLink("更多>>", "Article_List", new { more = ViewData["V3"] }, new { @class = "more pull-right" })
我就知道new一个onclick事件  只是不知道如何Post
这样写
 @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" })) {
            @Html.AntiForgeryToken()