繁体   English   中英

如何在mvc3的控制器中的动作的get方法中获取Formcollection值?

[英]How to get Formcollection values in the get method of an action in a controller in mvc3?

单击按钮后,我在网格中显示数据。 在网格中sort属性的值为true。 所以问题是当我按网格中的链接对特定的列或下一页进行排序时,它正在调用该操作的get方法,结果是没有。 我该如何实现??? 提前致谢....

它不会在FormCollection因为您没有发布数据。 看看QueryString

public ActionResult NewUser(FormCollection formCollection)
{
    String roleValue1 = formCollection["inputRole"];
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM