62,046
社区成员
发帖
与我相关
我的任务
分享
protected void btnUpdate_Click(object sender, EventArgs e)
{
for (int i = 1; i <= 3; i++)
{
RadioButton rb = this.FindControl("RadioButton" + i) as RadioButton;
if (rb != null && rb.Checked)
{
string s = rb.Text;
Response.Write(s);
}
}
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
RadioButton[] rads ={ RadioButton1, RadioButton2,RadioButton3};
for (int i = 0; i < rads.Length; i++)
{
if (rads[i].Checked)
{
Response.Write(rads[i].Text);
}
}
}