【发布时间】:2014-02-03 17:02:11
【问题描述】:
这是 Datatables.net 发送到我的 MVC 操作的查询字符串:
?sEcho = 8&iColumns = 6&sColumns =&iDisplayStart = 0&iDisplayLength = 10&mDataProp_0 = HomeCountry&mDataProp_1 = HostCountry&mDataProp_2 = YearOneRate&mDataProp_3 = YearOtherRate&mDataProp_4 = RateType&mDataProp_5 =控制与SSEARCH =&bRegex =假sSearch_0 =&bRegex_0 =假bSearchable_0 =真sSearch_1 =&bRegex_1 =假bSearchable_1 =真sSearch_2 =&bRegex_2 =假bSearchable_2 =真sSearch_3 = bRegex_3 =假bSearchable_3 =真sSearch_4 =&bRegex_4 =假bSearchable_4 =真sSearch_5 =&bRegex_5 =假bSearchable_5 =真iSortCol_0 = 1&sSortDir_0 = ASC&iSortingCols = 1&bSortable_0 =真bSortable_1 =真bSortable_2 =真bSortable_3 =真bSortable_4 =真bSortable_5 =假&_ = 1391446190711
&
这是我在 MVC 中的控制器操作标头:
public JsonResult GetData(int sEcho, int iDisplayStart, int iDisplayLength, string sSearch)
我的问题是:我如何获得这些变量(?):
bSortable_0=true&bSortable_1=true&bSortable_2=true&bSortable_3=true&bSortable_4=true&bSortable_5=false
注意bSortable_ 后面的数字可能是 0 到 5 或更多。
【问题讨论】:
-
看看this,我觉得很有帮助。
-
谢谢你,这让我得到了答案。
标签: c# asp.net-mvc datatables jquery-datatables