Link to home
Start Free TrialLog in
Avatar of Eamon
EamonFlag for Ireland

asked on

Multiple Name Phone number entry

Hi,

I'm looking for the best approach for this in peoples opinion. I'm using c# .net 3.5. I'm comfortable with JavaScript also.

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.

Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

Try using a ASP:Repeater control.  This will create a table with as mwany rows as necessary to display the Bound Data.

AW
Avatar of Eamon

ASKER

@Arthur_Wood - I wont be dealing with displaying bound data. I will have a new page where the user will enter new names and phone numbers.

It will be very similar to the screen shot attached.
MultipleNameEntry.PNG
ok, I misunderstood what you were asking.

AW
Avatar of Eamon

ASKER

I did a quick mock up using a user control. Works okay. I think it might be a bit of overkill.

Anyone any ideas?
ASKER CERTIFIED SOLUTION
Avatar of Eamon
Eamon
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Eamon

ASKER

No solution provided so I'm going to go with the user control option.