Posted: 5/31/2011
I have created a panel with some text boxes on it & a button at code behind in c#.net
becoz I want to add that panel multiple times
user will enter values to those textboxes & click the submit button
I want to add event handler to that button
Please help me out...
Hi pallavi,
Can you show us your code?
Maybe you can accomplish this very easily with anonymous functions, like this:
button1.Click += delegate{ Response.Write("Hellow from here");}
Hope this helps.
Regards,Hajan
Posted: 6/1/2011
Hi Hajan,
Thanks for the reply
I have 3 linkbuttons as Add Current Professional Info, Add Past professional Info, Add more...
on the click event of all these buttons i am calling AddPanel() method in which i have created some lables,textboxses,button
code to add button:- Button btnsubmit =new Button;
btnsubmit.Text= "Submit";
btnsubmit.Click +=new EventHandler(btnsubmit_Click);
private Void btnsubmit_Click(Object sender,EventArgs e)
{
lblmessage.Text= "Hello";
}
but when i click submit button it's not showing me hello message
Posted: 6/16/2011
The same issue is explained here: http://www.codeasp.net/forums/asp-net-topics/clent-side-web-development/737/how-to-add-button-in-update-panel-at-runtime