复制代码 代码如下:
int intCount = this.GridView1.Rows.Count; //总行数
for (int i = 0; i < intCount; i++)
{
Label1.Text = ((HyperLink)GridView1.Rows[i].Cells[0].Controls[0]).Text.ToString().Trim();
}
for (i = 0; i < GridViewID.Rows.Count; i++)
{
CheckBox chkVote = (CheckBox)GridView1.Rows[i].FindControl("CheckBox2");
}
复制代码 代码如下:
foreach (GridViewRow row in GridView1.Rows)
{
CheckBox cb = (CheckBox)row.FindControl("CheckBox2");
if(cb.Checked==true)
{
}
}
新闻热点
疑难解答
图片精选