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