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

Validation process to cancel New user Wizard step?

Hi

I have created a couple of CreateUserSteps infront of the default one. I use
control validators for most of the fields but in the State drop down list I
want to make sure the user has chosed a state or prov. The first row in the
drop down list is
"select state/prov" so I want to make sure that when they hit the next
button that has changed. I tried the Next(click_event) but even when the data
is not valid it changes screens to the next step. Is there a way to abort the
change and stay on the same step?

Thanks
Apr 23 '06 #1
2 3625
In the NextButtonClick event of the Wizard control put the following
code:

protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
if (!IsValid)
{
e.Cancel = true;
}
}

That should do it. The WizardNavigationEventArgs passed to the event
handler has a property named Cancel that when set to true will abort
the navigation to the next step.

Hope this helps.

Apr 23 '06 #2
Perfect! that works great.

Thank you very much.

"Neutrino" wrote:
In the NextButtonClick event of the Wizard control put the following
code:

protected void Wizard1_NextButtonClick(object sender,
WizardNavigationEventArgs e)
{
if (!IsValid)
{
e.Cancel = true;
}
}

That should do it. The WizardNavigationEventArgs passed to the event
handler has a property named Cancel that when set to true will abort
the navigation to the next step.

Hope this helps.

Apr 23 '06 #3

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

Similar topics

6
by: Patrick Coghlan | last post by:
I want to create about 4 forms with the same dimensions and background colours, similar to the forms one has to traverse when installing various software packages. I'm using Visual Studio and...
5
by: Dennis C. Drumm | last post by:
Is there a way to prevent the user from leaving a tab on a TabControl until all the controls on that tab have finished validating? The problem I am experiencing is when a control fails its...
0
by: Code Rodent | last post by:
Hi there, Please please could someone shed some like on a problem that I'm having using a combination of Wizards, ValidationGroups and ValidationSummary controls. What I want to do is to have a...
5
by: Bruno Alexandre | last post by:
Using the RequiredFieldValidator I can show a message if the field is empty... ....but How can I JUST SHOW that message if a selected value from a DropDownList was previously selected? I...
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...
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...
2
by: sudhashekhar30 | last post by:
hi all i have textbox in step in wizard control(step-10). there are 10 steps. so i want validation on every page and user can't move to other step without completing all correct entry. when i...
6
by: GaryDean | last post by:
I see some references on debugging by attaching to a process. There are MSDN articles that show how to attach to a process for debugging. However, I can find no info on how exactly to get the...
5
AnuSumesh
by: AnuSumesh | last post by:
Hi, I am using asp:wizard control in my application to collect data from user. I want to validate the input data on click of each next button. I want to use clientside script to avoid the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.