473,402 Members | 2,072 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,402 software developers and data experts.

CustomValidator does not fire

Vi
Hi,
I have two pairs of a DropDownList and TextBox Controls and for each pair I
have a CustomValidator that makes sure that at least one of the two
(DropDownList or TextList) has a value.
When I submit the form, the OnServerValidate method for the first pair of
controls (DropDownList and TextList) fires, but for the second pair does not.
It make no sense, both pairs look exactly the same to me.
The only difference is that the second DropDownList gets populated based on
the selection in the first DropDownList .

Any ideas?
Thanks.
Nov 18 '05 #1
1 2670
One thing you should always remember with customValidator
is, for it to work, the control against which it is used,
should have a value. If there is no value, customValidator
wouldnt fire. So, its always a good idea to use
RequiredFieldValidator along with CustomValidator, to make
sure you catch the required field error

HTH
Kumar
-----Original Message-----
Hi,
I have two pairs of a DropDownList and TextBox Controls and for each pair Ihave a CustomValidator that makes sure that at least one of the two(DropDownList or TextList) has a value.
When I submit the form, the OnServerValidate method for the first pair ofcontrols (DropDownList and TextList) fires, but for the second pair does not.It make no sense, both pairs look exactly the same to me.
The only difference is that the second DropDownList gets populated based onthe selection in the first DropDownList .

Any ideas?
Thanks.
.

Nov 18 '05 #2

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

Similar topics

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: 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...
2
by: http://www.visual-basic-data-mining.net/forum | last post by:
I would like to validate a field but with an "If" statement to check whether that field should be mandatory or optional based on the option that the user has selected from a dropdownlist. I used...
2
by: 2obvious | last post by:
Below is a cut-and-paste code example that runs. It demonstrates some results which confuse me. It uses a DataGrid to make a table with 12 rows, each containing a TextBox and a CustomValidator....
0
by: cn_tomcat | last post by:
I have few CustomValidators and other Validators on one of my page. when the page loaded, I use document.getElementById("btnValidate").click() to auto validate data on the screen. after that, user...
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
5
by: Dave | last post by:
I've suprisingly not been able to find examples on this. I'm creating a user account setup page, and the validators work fine on all the other fields. But now I'm creating a customvalidator (for...
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...
2
by: Epetruk | last post by:
Hello, I have an ASP.NET page which consists of a button (cmdSave), a label (lblMessage), a text field (txtName) and a custom validator (vldName). vldName is supposed to do both client *and*...
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: 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
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
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...

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.