dynamic label
how to create label , textbox and button dynamically on button cilck event using C# code behind for web application
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pradip PandeyPosted Mar 22, 2013, 12:50 AM
Write the following syntax on button click event
Button button = new Button();
Page.Controls.Add(button);
Page.Controls.Add(label);
Page.Controls.Add(textbox);
Hope it will help you.
Arul ManivannanPosted Mar 21, 2013, 9:07 AM
Label lbl = new Label();
lbl.Text = "Tamil Eelam is the destiny";
Page.Controls.Add(lbl);
Button btn = new Button();
btn.Text = "New";
Page.Controls.Add(btn);
TextBox txt = new TextBox();
Page.Controls.Add(txt);
Hope this helps. Arul Manivannan