473,386 Members | 1,598 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.

CustomValidator query

I have a couple of CustomValidator components on an ASP.NET page, using C#
and VS. If there
are values in the validated fields the OnValidate events are triggered.
However, if they are blank, they are
not. I want to validate them for not blank and then, if they are not blank,
do some additional validation.

Is there a way to get the OnValidate event to trigger, even if the fields
have not been entered.

TIA

Kevin
Nov 18 '05 #1
3 920
Clear ControlToValidate property

"KevinI" <ke****@ictcambridge.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
I have a couple of CustomValidator components on an ASP.NET page, using C#
and VS. If there
are values in the validated fields the OnValidate events are triggered.
However, if they are blank, they are
not. I want to validate them for not blank and then, if they are not blank, do some additional validation.

Is there a way to get the OnValidate event to trigger, even if the fields
have not been entered.

TIA

Kevin

Nov 18 '05 #2
I would learn how to properly set my system time first.

Bob Lehmann

"KevinI" <ke****@ictcambridge.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
I have a couple of CustomValidator components on an ASP.NET page, using C#
and VS. If there
are values in the validated fields the OnValidate events are triggered.
However, if they are blank, they are
not. I want to validate them for not blank and then, if they are not blank, do some additional validation.

Is there a way to get the OnValidate event to trigger, even if the fields
have not been entered.

TIA

Kevin

Nov 18 '05 #3
Use a second validator - a required field validator - on the validated
fields.

"KevinI" <ke****@ictcambridge.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
I have a couple of CustomValidator components on an ASP.NET page, using C#
and VS. If there
are values in the validated fields the OnValidate events are triggered.
However, if they are blank, they are
not. I want to validate them for not blank and then, if they are not blank, do some additional validation.

Is there a way to get the OnValidate event to trigger, even if the fields
have not been entered.

TIA

Kevin

Nov 18 '05 #4

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

Similar topics

7
by: jcpmeticulus | last post by:
Hi I've spent the last day or so debugging a problem with a CustomValidator and am now totally stumped! Basically I use a number of CustomValidator's on my page, but have cut this down now to...
1
by: bill yeager | last post by:
I'm using the customvalidator in my web page. I get the following error when I try to run the web page: Unable to find control id 'lstRider' referenced by the 'ControlToValidate' property of...
2
by: Stephen Miller | last post by:
Can the CustomValidator be used to simply report unexpected errors, without requiring Client/Server validation? To explain, say you had a simple text box and button that did a Full-text Search of a...
3
by: Ronan Dodworth | last post by:
Hi there I'm having a little bit of a problem with my customvalidator control. The problem is the javascript runs fine on my local webserver IIS but not when I post it to the web hosting server....
3
by: philipl | last post by:
hi, i have a textbox in my edititemtemplate in my datagrid. I have created a customvalidator for it, when i update the row the appropiate function gets called to customvalidate but the problem...
1
by: SMG | last post by:
Hi All. My forms has two textboxes, 1 username, 2 password. Both has requiredfield validator it works fine when there is no input in these textboxes. And the errorMsg is shown in...
0
by: ghafranabbas | last post by:
This is how you use the customvalidator control in any INamingContainer interface control (Datagrid, DataList, DataRepeater, etc). 1. In the ItemTemplate, place your customvalidator 2. Set the...
1
by: Beffmans | last post by:
Hi I have defined an customvalidator on my TextBox: function clientvalidate(source, arguments){ { // even number? if (arguments.Value%2 == 0) arguments.IsValid = true; else
1
by: David | last post by:
I need help with CustomValidator in 1.1. I added the CustomValidator control and code as per the doc., (See below) However, the code is never executed. Is there an extra switch or setting to...
2
by: Jeff | last post by:
hey net 3.5 I have problem with a customvalidator. I enter values into the TextBox named "txt" and clicks on the save button (ibSave) then the TestValidate method get triggered. TestValidate...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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
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.