使面板在单选按钮选择上可见 [英] making panel visible on radio button selection
本文介绍了使面板在单选按钮选择上可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有字段yes和no的单选按钮列表控件,我在网页上也有一个面板控件
我想要这样一种方式:当我单击是"时,面板将变得可见,而当我单击否"时,面板将变得不可见.
我只想知道单选按钮列表中的哪个事件我必须调用才能完成该任务..这样,我只需单击单选按钮就可以使面板可见和不可见.
i have a radiobutton list controls with fields yes and no, i have a panel control on a web page too
i want in such a way that when i click on yes panel will become visible and when i click no.. panel wil become invisible.
i just want to know which event of radio button list i have to invoke to occomplish that task.. so i can make panel visible and invisible on just a click on radio button.
推荐答案
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
//the Autopostback property of the RadioButtonList1 should be True
if(RadioButtonList1.SelectedValue=="Yes")
{
pnl.Visible=true;
}
else
{
pnl.Visible=false;
}
}
客户端: http://stackoverflow.com/questions/2433592/asp-net-hiding-panel-using-javascript [
这篇关于使面板在单选按钮选择上可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文