473,395 Members | 1,949 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,395 software developers and data experts.

Wizard Steps - how can I say? On condition failed, stay on current step?

Hello,

I am spending too much time trying to sort out what I think should be simple. So here it is.

I have a wizard, with five steps.
<wizard1>
<wizardstep1><componant1></wizardstep1>
<wizardstep2><componant2></wizardstep2>
<wizardstep><componant3></wizardstep3>
etc...
</wizard1>

step2, componant 2, contains three instances of 2 htmlSelectboxes each.

so the componant looks like this:
[select a state][select a city]

and three instances of those are used. I only want to ensure that ONLY the very FIRST pair of htmlselectboxes(first control instance) is validated to contain values.

So, what I started doing was on buttonNext of wizardstep2 checking to see the selected values of each checkbox. Great, all is good and I know whether or not the first instance was selected. Hard part over?

no.

I can't figure out how to say: If (conditions fail) wizard1.step2=stays te same, don't move forward, this condition failed te process.

I tried wizard1.ActiveStepIndex =2 //this step index but it ignored it and moved on anyway
I tried wizard1.ActiveStepIndex = 1 //previous step and it DID go to step 1
I tried wizard1.ActiveStepIndex = 3 and it DID go to step3

I can't GET it to STAY on step 2 based on a success or failure of my validation. I have explained my validation to you only so you can see the complexity of the situation (in that a single control validation won't work here)

Thanks for help, I am pulling out my hair. It has to be easy.
Mar 22 '07 #1
2 2703
This is what I needed:

WizardNavigationEventArgs e)
{
if (!myConditionIsValid)
{
e.Cancel = true;
}
}
Mar 22 '07 #2
kenobewan
4,871 Expert 4TB
Welcome to the site. Well done on solving your problem and thanks for sharing the solution :).
Mar 23 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Bill Gauvey | last post by:
I have a wizard control on a page with the first two setps are static, created in the VS2005 UI; the remaining steps are created dynammically. For some reason I cant get it to retain in the...
1
by: rdlauer | last post by:
Two (hopefully) quick questions for you all: 1. Is there any way within a Wizard Step to programmatically determine whether or not a postback has occurred? It appears as though, after the first...
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...
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: clintonG | last post by:
The Wizard is on Step5 and some TextBox validation in Step5 has to be done on the server so I've been thinking I need to use the OnActiveStepChanged event. This server-side validation has to be...
0
by: clintonG | last post by:
OBJECTIVE: A Wizard control often needs two TextBoxes on specific steps. In this instance both Step5 and Step6 each require two TextBoxes in each step, that is, each step requires a TextBox to...
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...
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.