Click here to Skip to main content
15,890,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have added a Radiobuttonlist control dynamically and added a event for that control
but the method is not calling

here the code

C#
RadioButtonList rdolst = new RadioButtonList();
                        rdolst.ID = Qno;
                        rdolst.RepeatDirection = rep;
                        rdolst.Items.Add("A");
                        rdolst.Items.Add("B");
                        rdolst.Items.Add("C");
                        rdolst.Items.Add("D");
   rdolst.SelectedIndexChanged += new EventHandler(ddl_SelectedIndexChanged);


after i have added the method
C#
public void ddl_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            RadioButtonList rdoAns = (RadioButtonList)sender;
            string vlistindex = Convert.ToString(rdoAns.ID).Substring(6);
        }


this method is not calling

please help me :(
Posted
Updated 7-Mar-12 10:02am
v2

1 solution

is Property AutoPostBack set to True?
 
Share this answer
 

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

  Print Answers RSS


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