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

How can i validate this?

Hi,
I have a combo (DDL1) and a textbox (TXB1).
So, if the selecteditem of DDL1 is None (selectedindex =0) the validator
don't need to check if there's anything in TXB1.
If DDL1 selecteditem has anything different of None, the validator need to
check if TXB1 was fill.

Someone understand me?
How can I do that? Probably i will use custom control.

Thanks
Fernando
Nov 19 '05 #1
2 1037
You'll need to use the CustomValidator to achieve this. You can learn more
from:
http://aspnet.4guysfromrolla.com/articles/073102-1.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Fernando Lopes" <fe*******@remove.terra.com.br> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
Hi,
I have a combo (DDL1) and a textbox (TXB1).
So, if the selecteditem of DDL1 is None (selectedindex =0) the validator
don't need to check if there's anything in TXB1.
If DDL1 selecteditem has anything different of None, the validator need to
check if TXB1 was fill.

Someone understand me?
How can I do that? Probably i will use custom control.

Thanks
Fernando

Nov 19 '05 #2
There is an alternative to using a customvalidator. The 22 validators of
"Professional Validation And More" at
(http://www.peterblum.com/vam/home.aspx) all have a property called
"Enabler" where you specify a rule that smartly enables a validator. For
example, you use the RequiredTextValidator on TXB1 and set its Enabler to
the rule that detects if DDL1 has a selectedIndex <> 0. It is multibrowser
compatible (Microsoft's is limited to IE and IE/Mac).

I built Professional Validation And More to overcome the many limitations of
Microsoft's validators and make it easy for you to develop without much
custom coding and hacks.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Fernando Lopes" <fe*******@remove.terra.com.br> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
Hi,
I have a combo (DDL1) and a textbox (TXB1).
So, if the selecteditem of DDL1 is None (selectedindex =0) the validator
don't need to check if there's anything in TXB1.
If DDL1 selecteditem has anything different of None, the validator need to
check if TXB1 was fill.

Someone understand me?
How can I do that? Probably i will use custom control.

Thanks
Fernando

Nov 19 '05 #3

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

Similar topics

9
by: Rob Mayo | last post by:
I have a bunch of XSD files in my assembly as embedded content that are read out via reflection and streams. My app creates the XML on the fly, and I want to validate it using the schema files...
0
by: SHC | last post by:
Hi all, I have a VC++ .NET 2003 - Windows XP Pro PC. I created a Win32 console application in my VC++ .NET 2003 and copied validateDOM.cpp, books.xml and books.xsd (see the attached files below)...
5
by: Jim Heavey | last post by:
When should you use the Page.Validate() method? I thought you would use this method if you have some Server side validation (CustomControl's) you wanted to use and this would cause them to be...
11
by: jjbutera | last post by:
I know how to use the ErrorProvider in my winforms..or do I? I validate the values and set the ErrorProvider in the validating event. If not valid, I set e.Cancel = True. I clear the ErrorProvider...
0
by: Marc Scheuner | last post by:
Folks, I'm faced with a dilemma here - I have an XML document and for part of it, I have an XSD schema to validate it - but not for the rest of it. Can I still validate at least part of the...
1
by: SkipNRun | last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list. ...
24
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...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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...

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.