在protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)if (e.Row.RowType == DataControlRowType.DataRow) 事件下
模板列
Label lb = (Label)e.Row.FindControl("Label3")
取值:lb.text=....
绑定列
e.Row.Cells[1].Text=.....
0
0
(请您对文章做出评价)
本文介绍了如何在ASP.NET中使用GridView控件进行数据绑定的方法。具体包括如何在RowDataBound事件中通过模板列和绑定列获取和设置数据。此外还讨论了如何利用Label控件和Row.Cells属性来操作数据显示。

8676

被折叠的 条评论
为什么被折叠?



