Click here to Skip to main content
15,904,024 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,friends..
i have one table it have 5 column...in the aspx page i have one text box and button when the user click the button i want to add another textbox dynamically..
but it can allow only 4 textboxes because i have only 5 column in table...another one important poin is suppose user genarated only three textboxes means when the user click the update button i want to update the table with the three values at the same time the remaining two column automatically update with null value..
How can i achieve this...
thanks in advance....
Posted
Comments
Shubh Agrahari 19-Nov-12 6:04am    
for dynamic textbox u have to write the code-
if (!IsPostBack)
{
//bind textBox in placeholder its necessary for location
TextBox textBox = new TextBox();
textBox.ID = "TextBox1";
PlaceHolder1.Controls.Add(textBox);
}

but for above conditional query dear please describe those conditions clearly..

1 solution

Hi saravanan,

What will be the key field to update the data and who will insert the record in table ?

Regards,
Sunil Tiwari
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900