Validation

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Validation 1
Page.Invalid 5
Validation problem 6
validation doesn't fire 6
No Validation 2
checkbox validation 1
GridView and Validation Controls 0
Trying to build a SARIMAX model to forecast the S&P500 trend 0

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top