Here is what i did:
public delegate void specialRadioEventHandler(object sender, EventArgs e);
....
....
....
private void BuildMyDialog()
{
//Dynamically creating my table . Function called in
page_Load(IsPostBack==false)
....
....
....
RadioButton rb = new RadioButton();
if (RadioMeetMycodnition)
{
rb.AutoPostBack = true;
rb.CheckedChanged+=new MyOwnEventHandler( DoSomething );
}
public voidDoSomething (object sender, EventArgs e)
{
//Only for testing purpose.
string teststring = "oi";
Response.Write(teststring);
}
Can you spot out something wrong?
"bredal Jensen" <br******@jensen.dk> wrote in message
news:uL**************@TK2MSFTNGP10.phx.gbl...
Hello gurus,
I need to dynamically create event handlers for my dynamically created
radio buttons in
an aspx.cs page.
The event should be fired when a user select the radio button.
I set the "autoposback" property to true for the buttons that need
to fire events when they are selected .
How can i do this with delegates?
Thanks in advance
Jensen