,asp.net中gridview嵌套使用radiobutton怎样实现单选,具体代码?还有怎样把vote_num写入数据库有分,急急
for(i=0;i<2;i++){if(((RadioButton)GridView1.Rows[i].FindControl("xuanze")).Checked){R...
for (i = 0; i < 2; i++)
{
if (((RadioButton)GridView1.Rows[i].FindControl("xuanze")).Checked)
{
Response.Write("被选中拉");
string sid = GridView1.DataKeys[i].Value.ToString();
Response.Write(sid);
vote_num = vote_num + 1;
Label1.Text += vote_num;
}
i++;
}这是我写的一段代码, 展开
{
if (((RadioButton)GridView1.Rows[i].FindControl("xuanze")).Checked)
{
Response.Write("被选中拉");
string sid = GridView1.DataKeys[i].Value.ToString();
Response.Write(sid);
vote_num = vote_num + 1;
Label1.Text += vote_num;
}
i++;
}这是我写的一段代码, 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询