all groups > asp.net webcontrols > december 2006 >
You're in the

asp.net webcontrols

group:

Enter text in at least one textbox


Enter text in at least one textbox Tigers21
12/6/2006 9:16:56 PM
asp.net webcontrols:
I want to check if at least one of my two textboxes has an entered value....
If none of them has a value, I want a validator to show an errormessage....

How do I do that?
Re: Enter text in at least one textbox Brennan Stehling
12/8/2006 12:40:18 PM
You can implement a CustomValidator. Drag it onto your web form from
the toolbox. The handle the ServerValidate and in that method set the
args.IsValid property based on your logic.

http://msdn2.microsoft.com/en-us/library/9eee01cx.aspx

Brennan Stehling
http://brennan.offwhite.net/blog/


[quoted text, click to view]
AddThis Social Bookmark Button