• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

Long Form in ASP.NET, Need Opinions

I have a long form with about 85 fields in it that users will fill out. Form is using C# with a sql server back end.

So having session issues is a concern because user may fill out a portion of the form, leave it be, and then come back to it after for some time. If they accidently cancel out of it before committal maybe an issue as well.

  I am just looking for ways to best handle this. My supervisor is having me re-write this application . Apparantly, the form was not very reliable and the developer before me used a lot of session variables.

I was thinking about doing this with panels and a temporary table. Would write to the temp table after each panel is filled out. Would transfer data in a button click at the end of the form. But this is just me thinking

Any opinions or suggestions are most appreciated.  
0
jazzcatone
Asked:
jazzcatone
4 Solutions
 
Randy DownsOWNERCommented:
Maybe this will help

http://forums.asp.net/t/1042632.aspx/1

Boy, this is right up my alley. I maintain an app that has a LOT of long forms like this.

Best way is to use a Multiview. Split up your form into logical units, and place them into different Views. On each view, you can place buttons to take them back to the previous view or to continue on to the next View. The continue button can fire Validation in the current view, so that each View is validated before continuing. The last view would be a preview page with a submit button instead of a continue button. On this continue page, you could even set up linkbuttons to automatically go back to the appropriate "page" to edit past entries. You can dynamically set the button to an update method instead of continung, which would jump them back to the preview page after editing.

The beauty of this is that you never pass values to different pages, because technically the form is all on the same page! They just appear to be different to the user. No cookies, session variables, blah blah blah. Very cool.

I'd suggest checking this out:

http://msdn2.microsoft.com/en-gb/library/ms227665(VS.80).aspx

While you're at it, look into the Wizard control also. They are both similiar, and often, choosing one over the other is a matter of preference. For more complex forms where you need to control navigation precisely, MultiView is the way to go.
0
 
Randy DownsOWNERCommented:
From your description,I recomment you to use master page and content page to deal with your business.If you want to pass parameters across different web forms,session variables and url with parameters are also popular in asp.net 2.0.

If you want to create a personlized website,web part,themes,Ajax and so so are suitable for you.

Here is a link about new features in asp.net 2.0 for your reference.

http://www.c-sharpcorner.com/Code/2004/July/NewASPNet20Features.asp

http://www.c-sharpcorner.com/Code/2004/July/NewFeaturesASPNET.asp

http://www.codeproject.com/books/net2_cs2_newfeatures.asp
0
 
strickddCommented:
There are several techniques I've used in the past.

1. Use and <asp:UpdatePanel /> with a timer that will post to the server and therefore keep the session alive.

2. Use javascript to call a webservice that has session state enabled to keep the session alive

3. Create a GUID cookie that relates to a current user login, when checking the session, perform an additional check if there is no session set.
   - this check will compare the GUID to a DB table and auto-login the user
   - process the post as normal then, this will require not using REQUEST validation
0
 
asp_net2Commented:
Is there a reason you want to force the browser to retain the data if there is no presence by the user? Have you also looked into using the Wizard Control? Or breaking your form down into sections and passing the User's ID (PK) back and fourth between pages using a Session variable?
0
 
jazzcatoneAuthor Commented:
Thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now