Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   Check required field in custom validator (http://www.velocityreviews.com/forums/t773799-check-required-field-in-custom-validator.html)

Alex Shirley 07-13-2004 05:26 PM

Check required field in custom validator
 
Hi

I'm trying to check for a required field in a textbox using a custom
validator. I do not want to use a requiredfieldvalidator in this
instance.

I have tried the following code within the serverValidate handler and
it will not work:

If txtTheTextBox.Text.Trim <> "" Then
args.IsValid = True
else
args.IsValid = False
End If

.... and it refuses to work! Note serverValidate code does fire (I am
using other code as well in this custom validator and it works).
I don't think the blank string comparison is working.
Any ideas?

Thanks

Alex


All times are GMT. The time now is 04:23 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.