I have a radiobutton control dynamically generated inside of a repeater. On this radiobutton I am calling OnCheckChanged
to change some value in the code behind on checking on the radiobutton.
<EclipseUI:CustomRadioButton ID="RadioButton_Selected" runat="server" GroupName='<%# "s_id_" + Eval("FeaturePackId") %>'
OnCheckedChanged="RadioButton_Selected_OnCheckedChanged"/>
My Radiobuttonis above and calls the shown method.
If it makes any difference the radiobutton is being checked and unchecked by jquery code on a div click.
protected void RadioButton_Selected_OnCheckedChanged(object sender, EventArgs e)
{
CustomRadioButton rb = (CustomRadioButton) sender;
System.Diagnostics.Debug.WriteLine(rb.GroupName);
int FeatureID = Int32.Parse(rb.GroupName.Remove(0, 4));
if (rb.Checked)
{
FeatureList.Add(FeatureID);
}
if (!rb.Checked)
{
foreach (var itemToRemove in FeatureList)
{
FeatureList.Remove(itemToRemove);
System.Diagnostics.Debug.WriteLine(itemToRemove);
}
}
}
public List<int> FeatureList = new List<int>();
This code basically adds of subsracts the value on the radiobuttonto the List of ints. However this method is not being called at all. I have tried placing the debug writeline statements but these do not output anything to the output window.
Does anyone know why this method is not firing?