how to add 10 textboxes on one click
Can any one know how to add 10 textboxes on one click in asp.net
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.
VulpesPosted Feb 4, 2015, 9:56 AM
// ....
arun kumarPosted Mar 26, 2015, 7:53 AM
akshay rasalakarPosted Feb 4, 2015, 9:28 AM
Manish Kumar ChoudharyPosted Feb 4, 2015, 12:03 AM
akshay rasalakarPosted Feb 3, 2015, 11:59 PM
akshay rasalakarPosted Feb 3, 2015, 11:59 PM
Khargesh RajputPosted Feb 3, 2015, 11:24 PM
Manish Kumar ChoudharyPosted Feb 3, 2015, 11:17 PM
For anyone else trying to do something like this, don't. Instead, think of the flow of information and understand that there is a better way to do it. The input control(s) do not need to be dynamically created. They can be static, and upon filling out and submitting on one, that information has to go somewhere (database, cache, session, for example). Once it's there, on postback, loop through all items in your storage of choice and creates a display for them.
Manish Kumar ChoudharyPosted Feb 3, 2015, 11:15 PM
int n=5; for (int i=0;i
{
TextBox MyTextBox=new TextBox(); //Assigning the textbox ID name
MyTextBox.ID = "tb" +""+ ViewState["num"] + i;
this.Controls.Add(MyTextBox);
}