Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

Wizard SideBarButtonClick

 
 
GaryDean
Guest
Posts: n/a
 
      06-15-2008
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?

--
Regards,
Gary


 
Reply With Quote
 
 
 
 
Michael Nemtsev [MVP]
Guest
Posts: n/a
 
      06-16-2008
Hello GaryDean,

use the session or url string for this

---
WBR,
Michael Nemtsev [Microsoft MVP] :: blog: http://spaces.live.com/laflour

"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?
G>


 
Reply With Quote
 
 
 
 
Steven Cheng [MSFT]
Guest
Posts: n/a
 
      06-16-2008
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
viewstate).

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"];

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

Response.Write(
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.

Sincerely,

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:
http://www.velocityreviews.com/forums/(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

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
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
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?
>
>--
>Regards,
>Gary
>
>
>


 
Reply With Quote
 
 
 
Reply

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 bhakta.ram@gmail.com 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



Advertisments