473,785 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

validate two textboxes with one validator

Hey,
i am currently looking for a nice solution for the following problem
( i could not find a sufficient solution in the other postings ):

I am having several textboxes on my page, some of them have
RequieredFieldV alidators some not and i am having a ValidationSumma ry
at the top of my page to list all blank textboxes. Everything is
working fine so far...
but now i have two other textboxes. At least one of these two
textboxes
has to be filled. I wanted to implement another validator to check if
the content of both them is empty. If both of them are empty i want to
have one
message item in my summary....

I could not find a possibility to solve this problem in a good and
smart way.
I thought about using a customValidator with a clientscript but this
also did
not work probably.

Please can anybody help me, two validate two textboxes with one
validator, so that i still can list all invalid controls in my
validationSumma ry.

Thanks a lot !!!!
Drew
Nov 18 '05 #1
0 1260

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

Similar topics

8
3103
by: Dean Speir | last post by:
Hi... I've been referred to this Newsgroup by the W3C Markup Validator FAQ. I've been happily using this Validator <http://validator.w3.org> for the past 18 months with great success, but suddenly I cannot get it to "read" my HTML documents by the "Validate by File Upload" method. It keeps giving me the following message: Sorry, I am unable to validate this document
4
10777
by: Mr. x | last post by:
Hello, I know about the validator on : http://validator.w3.org , which can validate html pages. I just new to this validator. How can I validate (if it can be - by this validator) aspx pages, and asmx pages ? Thanks :)
1
1297
by: Jon Davis | last post by:
This is always returning True, even when fields are empty. Why? private bool ValidatePageOne() { bool ret = true; foreach (Control ctrl in PageOnePanel.Controls) { if (ctrl.GetType().IsSubclassOf(typeof(BaseValidator))) { ((BaseValidator)ctrl).Validate(); if (!((BaseValidator)ctrl).IsValid) ret = false;
3
2053
by: Jon Davis | last post by:
This is always returning True, even when fields are empty. Why? private bool ValidatePageOne() { bool ret = true; foreach (Control ctrl in PageOnePanel.Controls) { if (ctrl.GetType().IsSubclassOf(typeof(BaseValidator))) { ((BaseValidator)ctrl).Validate(); if (!((BaseValidator)ctrl).IsValid) ret = false;
3
1704
by: JJ_377 | last post by:
how do I do this: textbox is in a panel control. the required field validator doesn't work. I tried putting the required field validator inside the panel and it doesn't work there either. my validators are working for controls OUTSIDE the panels.. help please? And, thank you. J.
5
1240
by: light of mind. heavy of belly | last post by:
Hi, I need to validate that at one of 2 textboxes has some data in it. Is it possible to hook the validation system to do this bearing in mind that empty textboxes are not evaluated? Thanks for your ideas.
4
2597
by: Brybot | last post by:
I have a form that i've split up into multiple asp:panels, each panel has a number of validators which work correctly. At on the last panel, i want to commit the data collected to a database. I figured since all the panel data is still being sent through the postbacks, instead of using Sessions, or HttpContext, I could just take the values from the textboxes. This all works fine, except for security. I realized that I could inject...
5
1873
by: Ganesh | last post by:
Hi There, I need to validate email address with regular expression control, i tried something like this ^+*@*\.*$ but i need to validate even if it is blank, it should say invalid email, but don't want to use another requirefield validator
24
2110
by: Mike Hofer | last post by:
Please forgive the cross-post to multiple forums. I did it intentionally, but I *think* it was appropriate given the nature of my question. I'm working on an open source code library to help automate and clean up parameter validation code. It's almost ready to go into open beta. But one last little glitch is holding me up, and that would be the name of the factory class that serves as the entry point into the library: Validate.
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10329
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10092
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8974
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.