title: ASP.Net RadioButtonList SelectedIndexChanged event not firing
body: <p>I'm building a dynamic RadioButtonList to list all of the records for a particular search item and allow the user to select the relevant option. The problem I'm having however, is that the SelectedInhdexChanged event is never firing.</p>
  
  <p>I've tried initialising the RadioButtonList and assigning its event handler in the page_load and page_init methods. I've also tried dragging the RadioButtonList onto the page and double- clicking it to create the event handler that way- but still no luck.</p>
  
  <p>Any ideas? I've pasted my code below for you to have a look:</p>
  
  <p>Here's my Page_Load and event handler method:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
      {
          if (!Page.IsPostBack)
          {
              measureDropdown = loadDropdown("GetMeasuringTypes", measureDropdown);
              categoryDropdown = loadDropdown("GetCategories", categoryDropdown);
          }
  
          rBtn = new RadioButtonList();
          rBtn.CausesValidation = true;
          rBtn.SelectedIndexChanged += new EventHandler(rBtn_SelectedIndexChanged);
      }
  
      void rBtn_SelectedIndexChanged(object sender, EventArgs e)
      {
          moreThanOneLbl.Text = "Woohoo!";
      }
  </code></pre>
  
  <p>Here's how I assign the list items to the RadioButtonList (from a datatable):</p>
  
  <pre><code>foreach (DataRow row in table.Rows)
              {
                  ListItem li = new ListItem();
                  li.Value = row[0].ToString();
                  li.Text = row[1].ToString() + ": " + row[2].ToString();
                  //rBtn.Items.Add(li);
                  RadioButtonList1.Items.Add(li);
  
              }
  </code></pre>