hi,i create one button runtime and put in placeholder when i click on that it passes event handler to button_Click method.in that i call one function.when click on it
but it execute only once .
when button click n no. of times i want it execute that no of times but it not execute.
Thias is happening even button take drag & drop i.e not runtime.please help?
Loading
Suthish NairPosted Mar 10, 2011, 2:03 PM
Guest UserPosted Mar 9, 2011, 8:31 PM
Button myButton = new Button();
myButton.Click += new EventHandler(myButton_Click);
void myButton_Click(object sender, EventArgs e)
{
throw new NotImplementedException();
}
(Just reviewed your code) The code that assigns the event handler to myButton.Click must execute during every postback - try putting it in Page_Load.