Click here to Skip to main content
15,886,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 13-Mar-12 21:05pm
v2

C#
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;

}

  }
 
Share this answer
 
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900