"Panels" can do wonders!
page 1 of 1
Published: 11 Nov 2003
Unedited - Community Contributed
Abstract
Using ASP.NET ViewState to develop a wizard interface easily.
by Rajiv R.
Feedback
Average Rating: 
Views (Total / Last 10 Days): 9077/ 11

"Panels" can do wonders!

I saw my team mates develop wizards in our web-based application development project, that involved multiple steps, back & forth movement (with "next" and "back" buttons), and data being saved only in the last step.

I saw them code to persist data across pages (steps of the wizard) and in the process loaded the Session object.

I always wondered if ASP.NET's viewstate capabilities be put to good use! Some conceptual thinking resulted that use of "Panel" web control could be a boon!

Zooooom came an opportunity, thanks to an enhancement request from the client! :)

I was assigned a fairly simple wizard with about 4 steps. The methodology, I followed was this.

1. For every step of the wizard, I put a Panel web control.
2. One Set of "Cancel", "Next", "Back" & "Save" buttons at the bottom.
3. In the event handlers of these buttons, hide/unhide the panels and hide/unhide the buttons.
4. In the last step, unhide Save button and in the event handler, you have access to all the data across steps with no hassles!

The user gets a feel that each step is a different page, but as a developer, I had an easy time! Across the steps, I did just nothing to persist data. ASP.NET ViewState did it for me!

And at the last click, I had all the data in page to be saved! No hassles!

DownLoad

WizardDemo.Zip (22 KB)

This article was contributed by Rajiv. R and he can be reached at rajiv.raj@wipro.com.



User Comments

Title: really good   
Name: mathivanan
Date: 2011-03-09 5:09:46 AM
Comment:
It is very good to use
Title: Really amazing   
Name: Rohit Sharma
Date: 2005-12-07 12:15:22 AM
Comment:
The idea is really appriciable but it raises one question that if we will include too many server controls on a page then will it not make the web page overloaded?
Title: good to explain usability   
Name: Ankit Aneja
Date: 2005-10-15 2:55:06 AM
Comment:
ur article nicely explain how one can use panel control
nice one
Title: Not a good idea   
Name: Osama Ibrahim
Date: 2005-09-19 7:29:39 AM
Comment:
what about the size of the page !!! you can make this in windows application but it's not recommended in web.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-03-19 5:22:05 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search