gridview 模板里绑定多个参数
2011-10-28 15:48
274 查看
经常会遇到gridview绑定多个参数,头都大,简单点
protected void GridViewRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string url = "openNewWindow('ProductSell.aspx?id=" + e.Row.Cells[0].Text + "," + e.Row.Cells[4].Text + ",0')";
btnSell.Attributes.Add("onclick", url);
}
}
protected void GridViewRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string url = "openNewWindow('ProductSell.aspx?id=" + e.Row.Cells[0].Text + "," + e.Row.Cells[4].Text + ",0')";
btnSell.Attributes.Add("onclick", url);
}
}
相关文章推荐
- GridView 动态添加模板列并绑定数据 实现从外部直接传入控件 和 绑定字段参数
- 绑定GridView中的模板列
- GridView 动态添加绑定列和模板列
- GridView 绑定模板列
- GridView模板的LinkButton传递多个参数
- 动态创建模板列并绑定数据(GridView,Repeater,DataGrid)
- 如何处理GridView模板列绑定字段过长的问题(转)
- GridView动态创建模板并绑定
- 类模板、绑定器与参数推演
- GridView动态添加模板列(数据绑定)
- GridView等表格模板列绑定数据的方法
- AngularJS之基础-4 DI(控制器参数、监听)、指令(模板包含、节点控制)、事件绑定
- 动态创建模板列并绑定数据(GridView,Repeater,DataGrid)
- asp.net: GridView相关技术(五--模板列绑定字段过长的解决方案)
- 转:GridView 模板列中的数据绑定
- GridView模板之绑定到方法
- Gridview 绑定自定义页面模板
- 向GridView的模板列绑定OnClientClick的函数时出现了奇怪的问题
- GridView 模板列中的数据绑定
- GridView模板列绑定字段过长的解决方案