Hi KJ,
Scott's solution is correct. However, it has a couple of shortcomings. You
still have to figure out the client-side (javascript) code if you want
client-side validation and all client-side validation is still limited to IE
browsers as Microsoft's validators only support DHTML on the client-side.
Scott wrote an article on the subject of supporting validation on other
browsers:
http://aspnet.4guysfromrolla.com/articles/051204-1.aspx
He graciously notes that my software, "Professional Validation And More"
(
http://www.peterblum.com/vam/home.aspx) solves this problem.
It also solves the problem of building the javascript. I provide 22
validators including one that can handle a checkbox and another that can
combine any of the validators into a boolean expression. You can describe
your logic: checkbox checked or (textbox1 has text and textbox2 has text).
It creates the client-side and server side functions for you.
I wrote "Professional Validation And More" because there are so many
limitations in Microsoft's validators that keep forcing you to write custom
code and hacks. For a list of those limitations, see
http://www.peterblum.com/vam/valmain.aspx. It will help you as you plan your
site's validation design, even if you don't use my solution.
--- Peter Blum
www.PeterBlum.com
Email:
PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
"KJ" <kl******@hotmail.com> wrote in message
news:d8**************************@posting.google.c om...
I need help.
I have a checkbox and two textboxes on a webform. How can I validation
if a person either enters something in the two textboxes OR the
checkbox?
I tried using a custom validator but that is not working like I want
it.
Please help. I know this sounds easy but I cannot figure it out.
Thanks