gridview模板列中的按钮如何获取值

2024-10-31 15:12:36
推荐回答(1个)
回答1:





' /> />

....

protected void BtnClick(object sender,EventArgs e)
{
for (int i = 0; i < gridview1.Rows.Count; i++)
{
Lable lbl= (Lable )this.gridview.Row[i].FindControl("lbl1")
MessageBox(lbl.Text);
}

}