AspAlliance.com LogoASPAlliance: Articles, reviews, and samples for .NET Developers
URL:
http://aspalliance.com/articleViewer.aspx?aId=111&pId=-1
"Panels" can do wonders!
page
by Rajiv R.
Feedback
Average Rating: 
Views (Total / Last 10 Days): 9805/ 20

"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.


Product Spotlight
Product Spotlight 

©Copyright 1998-2021 ASPAlliance.com  |  Page Processed at 2021-02-26 1:29:10 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search