Solved

Long Form in ASP.NET, Need Opinions

Posted on 2011-09-07
5
390 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# Offline Apllication 5 53
Angular JS Route 3 45
IIS Authorization for Web Service 2 21
Need a starter for ETL protocol? 4 38
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

914 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

19 Experts available now in Live!

Get 1:1 Help Now