Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Wizard SideBarButtonClick

Thread Tools

Wizard SideBarButtonClick

Posts: n/a
In this event I can tell where I'm going via e.NextStepIndex but how can I
tell where I am coming from? Do I have to setup Session["whereamI"] and
track it myself?


Reply With Quote
Michael Nemtsev [MVP]
Posts: n/a
Hello GaryDean,

use the session or url string for this

Michael Nemtsev [Microsoft MVP] :: blog:

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

G> In this event I can tell where I'm going via e.NextStepIndex but how
G> can I tell where I am coming from? Do I have to setup
G> Session["whereamI"] and track it myself?

Reply With Quote
Steven Cheng [MSFT]
Posts: n/a
Hi Gary,

As for the Wizard control, it only store the current ActiveStep's Index
internally. And in the "SideBarButtonClick" event, it will provide the
currentIndex as one parameter and the target stepindex(the one user has
clicked) as next step index. If you need the further previous step index,
you need to manually persist it. One good place to store it is using
ViewState. And here you can simply use Wizard control's Attributes
collection to store it(that will be automatically persisted into

Here is a simple code snippet I've tried on this.
protected void Wizard1_SideBarButtonClick(object sender,
WizardNavigationEventArgs e)
string prev = Wizard1.Attributes["previous_step"];

string.Format("<br/>originally come from step{0} to step{1}"
, prev, e.CurrentStepIndex)

string.Format("<br/>will go from step{0} to step{1}"
, e.CurrentStepIndex, e.NextStepIndex)

Wizard1.Attributes["previous_step"] = e.CurrentStepIndex.ToString();

Hope this helps.


Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at: Removed).

Get notification to my posts through email? Please refer to

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
This posting is provided "AS IS" with no warranties, and confers no rights.

>From: "GaryDean" <(E-Mail Removed)>
>Subject: Wizard SideBarButtonClick
>Date: Sun, 15 Jun 2008 11:16:09 -0700

>In this event I can tell where I'm going via e.NextStepIndex but how can I
>tell where I am coming from? Do I have to setup Session["whereamI"] and
>track it myself?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Choosing what wizard to display (or wizard steps) based on a dropDownList value Andy B ASP .Net 0 04-19-2008 11:36 AM
ASP.NET Wizard with Wizard Steps being User Controls ASP .Net 0 09-21-2006 06:36 PM
WinXP Microsoft Photo Printing Wizard, and Scanner and Camera Wizard Orak Listalavostok Digital Photography 5 07-10-2004 07:15 PM
Re: Network Setup Wizard Jack Wireless Networking 0 06-19-2004 01:51 AM