adding eventhandler to webcontrol
i'm dynamically creating a button on run-time;
// Insert Delete Button
Button dummyDeleteButton = new Button();
dummyDeleteButton.ID = "dsb" + nSoundDBID;
dummyDeleteButton.Text = "Delete";
Then, I want to add a EventHandler to fall it into a method when clicked;
dummyDeleteButton.Click += new EventHandler(DeleteSoundButton_Click);
In breakpointed debug mode, i cannot see it is entering in DeleteSoundButton_Click method. Here's the method;
protected void DeleteSoundButton_Click(object sender, EventArgs e)
{
Button ClickedButton = ( Button ) sender;
Console.WriteLine(sender.ToString());
}
why?
thanx

