Author: tdela | Posted on: 1/30/2008 1:01:17 PM | Views : 281

I am creating controls dynamically to a page on a button click, there are 5 textboxes that are dynamically added to a placeholder on the click event of the button. That works fine but now I need to grab the values that were put into the dynamic textboxes and insert them in a table in the database. How can i get the values? Do i need to store them in an array? keep in mind that the dynamic controls can be added as many time as the user neesd them.

 I am able to get the data of what was submitted but i don't know how to insert them in the database, here is how I get the values:

 1 private void IterateThroughControls(Control parentControl)
2 {
3
4 foreach (Control ctrlChildren in parentControl.Controls)
5 {
6 Go to the complete details ...