Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Long Form in ASP.NET, Need Opinions

Posted on 2011-09-07
5
Medium Priority
?
400 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 30

Accepted Solution

by:
Randy Downs earned 1000 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 30

Assisted Solution

by:Randy Downs
Randy Downs earned 1000 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 500 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 500 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

610 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