列表页面传递参数

步骤一:在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);
}

 

posted @ 2015-09-16 06:52  中酷科技ZKWeb博客  阅读(275)  评论(0编辑  收藏  举报