M
Mark A. Sam
Hello,
I placed a RegularExpressionvalidator on a webform to test a textbox for a
proper email format. I am trying to test for a failure but can't seem to
get a value. Here is what I tried:
EmailValidator.Validate()
If Not Page.IsValid Then
Beep()
txtEmail.Focus()
End If
ALSO
EmailValidator.Validate()
If Page.IsValid = False Then
Beep()
txtEmail.Focus()
End If
THEN
EmailValidator.Validate()
If Page.IsValid Then
'nothing
Else
Beep()
txtEmail.Focus()
End If
None of these three methods works, but
If Page.IsValid Then
Is recognized.
Thanks for any help
God Bless,
Mark A. Sam
I placed a RegularExpressionvalidator on a webform to test a textbox for a
proper email format. I am trying to test for a failure but can't seem to
get a value. Here is what I tried:
EmailValidator.Validate()
If Not Page.IsValid Then
Beep()
txtEmail.Focus()
End If
ALSO
EmailValidator.Validate()
If Page.IsValid = False Then
Beep()
txtEmail.Focus()
End If
THEN
EmailValidator.Validate()
If Page.IsValid Then
'nothing
Else
Beep()
txtEmail.Focus()
End If
None of these three methods works, but
If Page.IsValid Then
Is recognized.
Thanks for any help
God Bless,
Mark A. Sam