Bill Crawley
February 23rd, 2009, 01:07 PM
Hi All,
I have the following signature for a function:
protected void Option_SelectedIndexChanged(object sender, EventArgs e)
{.......}
in another event Im creating a buttonlist control:
RadioButtonList myradiobuttonlist = new RadioButtonList();
myradiobuttonlist.AutoPostBack = true;
myradiobuttonlist.ID = "RoomOptionsRadioButtonList" + roomIndex.ToString();
I need to bind myradiobuttonlist SelectedIndexChanged event to my method above, how do I do that please. I thought it might be the following, but the compiler doesn't like it.
myradiobuttonlist.SelectedIndexChanged += new Option_SelectedIndexChanged(myradiobuttonlist,new System.EventArgs);
Although I think I need to Bind to the Option_SelectedIndexChanged event, it might be ok if it has it's own event and this event calls Option_SelectedIndexChanged.
I have the following signature for a function:
protected void Option_SelectedIndexChanged(object sender, EventArgs e)
{.......}
in another event Im creating a buttonlist control:
RadioButtonList myradiobuttonlist = new RadioButtonList();
myradiobuttonlist.AutoPostBack = true;
myradiobuttonlist.ID = "RoomOptionsRadioButtonList" + roomIndex.ToString();
I need to bind myradiobuttonlist SelectedIndexChanged event to my method above, how do I do that please. I thought it might be the following, but the compiler doesn't like it.
myradiobuttonlist.SelectedIndexChanged += new Option_SelectedIndexChanged(myradiobuttonlist,new System.EventArgs);
Although I think I need to Bind to the Option_SelectedIndexChanged event, it might be ok if it has it's own event and this event calls Option_SelectedIndexChanged.