Solved

Long Form in ASP.NET, Need Opinions

Posted on 2011-09-07
5
387 Views
Last Modified: 2012-05-12
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
Comment
Question by:jazzcatone
5 Comments
 
LVL 29

Accepted Solution

by:
Randy Downs earned 250 total points
ID: 36495441
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
 
LVL 29

Assisted Solution

by:Randy Downs
Randy Downs earned 250 total points
ID: 36495446
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
 
LVL 28

Assisted Solution

by:strickdd
strickdd earned 125 total points
ID: 36495752
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
 
LVL 4

Assisted Solution

by:asp_net2
asp_net2 earned 125 total points
ID: 36497526
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
 

Author Closing Comment

by:jazzcatone
ID: 36504517
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now