我想根据在RadioButtonList中检查radiobutton off来显示Textboxes,但是没有显示任何更改。
protected void Page_Load(object sender, EventArgs e)
{
}
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
switch (RadioButtonList1.SelectedIndex)
{
case 2:
TextBox3.Visible = true;
goto case 1;
case 1:
TextBox2.Visible = true;
goto case 0;
case 0:
TextBox1.Visible = true;
goto default;
default:
break;
}
}
答案 0 :(得分:0)
检查并制作AutoPostBack =" True"。