Click here to Skip to main content
15,921,382 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I'm trying to create a form where the user gives number to generate textboxes. when for example the user enters 3 into textbox, three text boxes get generated in the new frame. now when the user write data into these text boxes I want it to be saved in MYSQL database. Anybody please help me into this.
Updated 10-Jul-12 4:53am

1 solution

try Dynamically adding textboxes

create the Text box Ids like "txt_" + count

save the maximum count in a viewstate, do page.findcontrol in a loop with the count

then you can insert the values to the database
Share this answer
2011999 10-Jul-12 11:37am    
please give me example
Shemeer NS 10-Jul-12 11:50am    
have you checked the link that I have given... its not for copy paste just to understand the main logic....
2011999 10-Jul-12 12:34pm    
i was try in my database table fields 10 columns, using for loop i generate 10 textboxes but i did't add text box values into database.

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