473,394 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Stop Wizard from progressing to next step.

Howdy,

I have a wizard to retrieve lost passwords on my site. The first page asks
for their username then they click Next. On the next click I have the
validation against the database to see whether or not its a valid username.
If its not, I'm displaying a little message that its incorrect, but the
wizard continues to the next step anyway. It will display the error message
(page control outside of wizard) but also display step 2. I've tried adding
both of these lines to my click function but neither works, how do I get
around this?

Protected Sub wzRecover_NextButtonClick(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.WizardNavigationEventArg s) Handles
wzRecover.NextButtonClick

Select Case wzRecover.ActiveStepIndex

Case 0

If Not DoesEmailExist(UCase(txtEmail.Text)) Then

lblError.Text = "Email address does not exist. Please enter a valid email
address."

wzRecover.ActiveStepIndex = 0
OR
wzRecover.MoveTo(WizardStep1)

Exit Sub

End If

Case 1

Case 2

End Select

End Sub

Thanks!!

David Lozzi
Oct 9 '06 #1
2 3858
You have to use the event for the middle of the step and change e.Cancel to
true. That will stop forwarding.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"David Lozzi" <dl****@nospam.nospamwrote in message
news:eL**************@TK2MSFTNGP04.phx.gbl...
Howdy,

I have a wizard to retrieve lost passwords on my site. The first page asks
for their username then they click Next. On the next click I have the
validation against the database to see whether or not its a valid
username. If its not, I'm displaying a little message that its incorrect,
but the wizard continues to the next step anyway. It will display the
error message (page control outside of wizard) but also display step 2.
I've tried adding both of these lines to my click function but neither
works, how do I get around this?

Protected Sub wzRecover_NextButtonClick(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.WizardNavigationEventArg s) Handles
wzRecover.NextButtonClick

Select Case wzRecover.ActiveStepIndex

Case 0

If Not DoesEmailExist(UCase(txtEmail.Text)) Then

lblError.Text = "Email address does not exist. Please enter a valid email
address."

wzRecover.ActiveStepIndex = 0
OR
wzRecover.MoveTo(WizardStep1)

Exit Sub

End If

Case 1

Case 2

End Select

End Sub

Thanks!!

David Lozzi


Oct 9 '06 #2
What? Middle of the step? e.Cancel? Can you be a little more specific?

Thanks,

David Lozzi
"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:OO**************@TK2MSFTNGP05.phx.gbl...
You have to use the event for the middle of the step and change e.Cancel
to true. That will stop forwarding.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"David Lozzi" <dl****@nospam.nospamwrote in message
news:eL**************@TK2MSFTNGP04.phx.gbl...
>Howdy,

I have a wizard to retrieve lost passwords on my site. The first page
asks for their username then they click Next. On the next click I have
the validation against the database to see whether or not its a valid
username. If its not, I'm displaying a little message that its incorrect,
but the wizard continues to the next step anyway. It will display the
error message (page control outside of wizard) but also display step 2.
I've tried adding both of these lines to my click function but neither
works, how do I get around this?

Protected Sub wzRecover_NextButtonClick(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.WizardNavigationEventArg s) Handles
wzRecover.NextButtonClick

Select Case wzRecover.ActiveStepIndex

Case 0

If Not DoesEmailExist(UCase(txtEmail.Text)) Then

lblError.Text = "Email address does not exist. Please enter a valid email
address."

wzRecover.ActiveStepIndex = 0
OR
wzRecover.MoveTo(WizardStep1)

Exit Sub

End If

Case 1

Case 2

End Select

End Sub

Thanks!!

David Lozzi



Oct 9 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ram | last post by:
Hi All, I am using a wizard control in a nested master page. I have added 3 steps in the wizard. I have placed only a single label control in each of the wizard steps. While running the...
0
by: Marty | last post by:
New ASP.Net page with a master page assigned. I add a wizard control to the content of the page. Clicking next the first time the control will move to the next step but clicking next after the...
12
by: raghav | last post by:
Hi I am working on ASP.NET 2.0. I am developing a website using Wizard control. Based on number of steps added, next, previous, finish buttons generate automatically. After running the...
0
by: raghav | last post by:
Hi I am working on ASP.NET 2.0. I am developing a website using Wizard control. Based on number of steps added, next, previous, finish buttons generate automatically. After running the...
0
by: Steve Funk | last post by:
All, I have searched all around and have not yet found the answer to this nor a solution. Hopfully it will be easy to overcome. Here is what I am trying to do: I'm trying to build a wizard...
1
by: Nightcrawler | last post by:
I am using a Wizard control with 5 steps. On step 2 the user is present with a radiobuttonlist with two listitems in it. If the first radiobutton is selected I want to take the user to step 3, if...
3
by: M. Ali Qureshi | last post by:
Hi, I have a wizard in my aspx page, and i create steps programatically. There are about 8 steps in all. The default text for StepNextButton is "Next". But i want that only in step 4, the next...
1
by: Andy B | last post by:
I have a wizard with multiple steps in it. On the first step, I have a gridView that shows the users current input for that particular step. The GridView is bound to an in memory object. When I...
8
by: GaryDean | last post by:
I have a Wizard page and need to affect the next and previous buttons from my code-behind. I've googled around and found two solutions, and neither appear to work. I can access the SideBarList...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.