码迷,mamicode.com
首页 > 其他好文 > 详细

列表页面传递参数

时间:2015-09-16 07:30:41      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:

步骤一:在cshtml文件中,如下设置

 var tableid = this.ValueProvider.GetOrDefault<long?>("tableid");

在加载表单的时候,如下获取new { conditions = new { TableId = tableid }

 @TableHelper.EnableAjaxTable(contextId, "/user_robot_pages/search",options: new { conditions = new { TableId = tableid } });

 

步骤二:在回调中获取参数

var tableid = request.Conditions.GetOrDefault<long>("TalbeId");
if (tableid > 0) {
     robotfields = robotfields.Where(r => r.TableID == tableid);
}

 

列表页面传递参数

标签:

原文地址:http://www.cnblogs.com/zhongku/p/4812042.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!