刚刚写一段代码用RadioButton的Chceked属性控制DropDownList控件的Visible
void check_change(object sender, EventArgs e)
{
if(RadioButton1.Checked)
DropDownList1.Visible=false;
else if(RadioButton2.Checked)
DropDownList1.Visible=true;
}
运行后没有反应,后来发现RadioButton的AutoPostBack设置为False,此属性控制是否自动将控件状态发送到服务器,设为true后便能正常运行。
相关文章:
-
2022-12-23
-
2021-08-09
-
2022-12-23
-
2021-11-12
-
2021-08-06
-
2022-12-23
猜你喜欢
-
2021-10-23
-
2021-05-20
-
2021-07-30
-
2021-09-19
-
2021-10-18
-
2022-12-23
-
2022-12-23
相关资源
-
下载
2021-06-05
-
下载
2021-07-01
-
下载
2022-12-08
-
下载
2021-06-26