Multiple Name Phone number entry
Posted on 2011-10-31
I need to have a web page that allows multiple entry of a name and telephone number. I need to display 20 rows to the user where each row simply has 1 textbox for Name and another for number. The data entered will be saved to a Database when the user clicks Save at the bottom of the 20 rows.
I'm most concerned with how to display the rows in my aspx page. I really don't want to use static code for 20 rows.
I was thinking about creating a user control with validation and then on my page have a For loop to create a version of this control 20 times. When one of these controls is completed, I have an event that saves the Name and number in session and when the user clicks save, I access the session variable and save to Database.
I could be barking up the wrong tree so I'm open to all suggestions.