【问题标题】:MVC Paging: Post method instead of Get methodMVC 分页:Post 方法而不是 Get 方法
【发布时间】:2016-06-22 13:38:04
【问题描述】:

当我点击表格下方的分页链接时,控件将使用 GET 方法,并且我在网格中的所有数据都丢失了。

当我点击分页号码时,有什么方法可以将控件重定向到 POST 方法。

【问题讨论】:

    标签: post razor model-view-controller pagedlist


    【解决方案1】:

    如果你使用 Html.ActionLink,你可以很简单

    Html.ActionLink(
                "Title", // <--Yuor title
                "Item",   // <-- ActionMethod
                "Login",  // <-- Controller Name.
                null, // <-- Route arguments.
                null  // <-- htmlArguments .. which are none. 
                      //     There you can set HTTP method, which will be requested
                )
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-09
      相关资源
      最近更新 更多