Click here to Skip to main content
15,908,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
RadioButtonList SelectedIndexChanged is firing only for the first time & not next time.I am unable to understand why it is happening.Plz help me.
Below is the code used.

 protected void Page_Load(object sender, EventArgs e)
{
   if (!IsPostBack)
    {
       if (isAlive)
       {
        rbllive.SelectedIndex = 0;
       }
       else
       {
       rbllive.SelectedIndex = 1;
       }
   }
}

protected void rbllive_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (rbllive.SelectedIndex == 1)
            {
                pnllive.Visible = true;

            }
            else
            {
                pnllive.Visible = false;

            }
        }


[edit]Edited for more readible code block - losmac[/edit]
Posted
Updated 9-Jul-11 6:49am
v3
Comments
Maciej Los 9-Jul-11 12:49pm    
Use [code block] tag.

Offcourse it is not firing once.Try to debug your code and see that it is not firing once.
 
Share this answer
 
did you add the "AutoPostBack=True" property?
 
Share this answer
 

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