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

Selective Validation Using Validator Controls

I'm not sure the subject of this post adequately describes my situation, so let my elaborate.

We have a web form with two textboxes--one for a start date/time and the other for an end date/time. We are wanting to use the validator controls to ensure that the user enters a date/time and that it's in the correct format, along with a couple of other validations. This is easy enough.

Our web page also includes links to navigate back one page or back all the way to the home page. These two actions are valid even if the dates/times in the textboxes are incorrect.

So, our question is... is there any way to 'selectively' validate using the validator controls? Again, clicking back or home should be allowed regardless of the validation, but clicking next should trigger the validation.

Thanks.

Nov 18 '05 #1
2 1283
On Wed, 26 May 2004 09:28:59 -0600, "Bobby Maul"
<BM*******@hotmail.com> wrote:
I'm not sure the subject of this post adequately describes my situation, so let my elaborate.

We have a web form with two textboxes--one for a start date/time and the other for an end date/time. We are wanting to use the validator controls to ensure that the user enters a date/time and that it's in the correct format, along with a couple of other validations. This is easy enough.

Our web page also includes links to navigate back one page or back all the way to the home page. These two actions are valid even if the dates/times in the textboxes are incorrect.

So, our question is... is there any way to 'selectively' validate using the validator controls? Again, clicking back or home should be allowed regardless of the validation, but clicking next should trigger the validation.


There is a property on the button named (I think) CausesValidation.
Set that to False.

Nov 18 '05 #2
If you change the links to buttons then you have access to the CausesValidation property. set to false those you do not want to validate
"Bobby Maul" <BM*******@hotmail.com> wrote in message news:#i**************@TK2MSFTNGP09.phx.gbl...
I'm not sure the subject of this post adequately describes my situation, so let my elaborate.

We have a web form with two textboxes--one for a start date/time and the other for an end date/time. We are wanting to use the validator controls to ensure that the user enters a date/time and that it's in the correct format, along with a couple of other validations. This is easy enough.

Our web page also includes links to navigate back one page or back all the way to the home page. These two actions are valid even if the dates/times in the textboxes are incorrect.

So, our question is... is there any way to 'selectively' validate using the validator controls? Again, clicking back or home should be allowed regardless of the validation, but clicking next should trigger the validation.

Thanks.

Nov 18 '05 #3

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

Similar topics

7
by: A.M | last post by:
Hi, I have a validation control in my page that upon any invalid data, it disables all buttons in the page. basicly i don't have any postback in the page if the validator finds any error. How...
14
by: Matt | last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or Client-Side form validation? Since I think each validator control can select either 1) JavaScript based error dialog or 2)...
9
by: AFN | last post by:
I was just dropped into someone else's code (isn't that always so fun?). I can't figure out why a custom validation control's server event function is executing. There is nothing (that I see)...
5
by: TJS | last post by:
I need to add validation to drodownlist control but it sends back an error message that says: "System.Web.UI.WebControls.DropDownList' does not allow child controls" the code is : If...
5
by: Sun Jian | last post by:
Hi, I am trying to customize the asp.net validation to achieve the following: Upon submitting the form, client side validation will run, and it will stop at the first error detected. For...
12
by: Dabbler | last post by:
I need to insure that at least one of three phone number fields has a value (requiredfield) but I'm not sure of a way to implement this without server side logic. Is there a way to use the...
0
by: tsw_mik | last post by:
I have created a custom control. It has: -label -button -list of textboxes -list of dropdownlists. I want to use a custom validator to perform some validation, but somehow I can't fo it. The...
0
by: Eniac | last post by:
Hi, I've been working on a custom user control that needs to be modified and the validation is causing me headaches. The control used to generate a table of 4 rows x 7 columns to display all...
1
gagandeepgupta16
by: gagandeepgupta16 | last post by:
Hi I am working on an entry form using validation controls in ASP.NET. I have two controls which requires custom validators, no issue in using plain custom validators. But when i am using...
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
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
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...

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.