Last post Apr 20, 2010 04:37 PM by Delebrin
Apr 20, 2010 12:54 PM|Delebrin|LINK
I'm working on building a Web Forms app to process an online application that users enter in. This application takes one set of person info (name, address, etc..) and then can take X number of several other sets of information. I have the database design
set up to handle the information (and all the keys/relationships). Where I'm having a problem is deciding the best way to handle taking the information on the web form.
Currently I'm thinking to build each set of information into its own user control and then trying to dynamically add an instance of the user control onto the page as needed to take each set of information. For instance, if one person has 3 personal references,
they could have a button to keep adding reference controls until they put in all the information. So you'd start with 0 controls, click add to have 1, click to add a second, etc..
I've read a lot of posts about issues regenerating the control, or problems with static variables when multiple people are using the same form and control counts being off. Am I taking the right approach to this project or is there an easier way I'm not
Any and all advice, tips, tricks, links, or help is GREATLY appreciated!
Thank you for taking the time to help out a new programmer!
Apr 20, 2010 01:45 PM|aderegil|LINK
I would like to follow a simple approach for your user interactions with that application.
1. Create the account with the basic information so you can assign the main record. It can be just the useremail/password or email/password.
2. Have a form for every set of information where you require just one set. As "General Info" (name, address, etc), or "Contact Preferences" (email,phone, etc).
3. When you have sets of information where you may have 0 or more instances, then follow this pattern:
- One page where you list the current entered sets (Past Job Positions)
- A link to enter an additional set (Add New Job)
- A separate web form where you ask for the info for that set (the new job form)
After the user enters the data on the form, send him back to the listing.
You also allow for edit and delete the information sets.
Go and take a look at www.linkedin.com and you will see this pattern.
Get away from dynamic controls! Keep it simple!
Apr 20, 2010 04:37 PM|Delebrin|LINK
I think your approach is definately the better way to handle this. I was just totally over thinking the situation and what all needed to be done. I'll need to rework the UI a little bit to make this work but it's a much better way to do it. No more dynamic
Thank you so much for your help!