469,890 Members | 1,425 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,890 developers. It's quick & easy.

CompareValidator and RequiredFieldValidator

Dear ASP.NET Programmers,

I am using a CompareValidator control to check the values entered into a
texbox. The textbox is for currencies, so the property Operator is set to
DataTypeCheck and the Type property is set to Currency. However, I would
like to control check whether the user enters a value or not. Do I have to
add an RequiredFieldValidator? Can't CompareValidator handle this?
Thanks in advance,

Burak
Nov 18 '05 #1
2 2122
Hi Buran...
You need to use Requiredfield Validator to check whether User entered value or not.
"buran" wrote:
Dear ASP.NET Programmers,

I am using a CompareValidator control to check the values entered into a
texbox. The textbox is for currencies, so the property Operator is set to
DataTypeCheck and the Type property is set to Currency. However, I would
like to control check whether the user enters a value or not. Do I have to
add an RequiredFieldValidator? Can't CompareValidator handle this?
Thanks in advance,

Burak

Nov 18 '05 #2
Taken from MSDN :
Note If the input control is empty, no validation functions are called and
validation succeeds. Use a RequiredFieldValidator control to require the
user to enter data into the input control.

this answer your question
Regards
Martin

"buran" <bu***@buran.com> wrote in message
news:Ou**************@TK2MSFTNGP12.phx.gbl...
Dear ASP.NET Programmers,

I am using a CompareValidator control to check the values entered into a
texbox. The textbox is for currencies, so the property Operator is set to
DataTypeCheck and the Type property is set to Currency. However, I would
like to control check whether the user enters a value or not. Do I have to
add an RequiredFieldValidator? Can't CompareValidator handle this?
Thanks in advance,

Burak

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Sjaakie Helderhorst | last post: by
4 posts views Thread by MattB | last post: by
1 post views Thread by R.A.M. | last post: by
1 post views Thread by R.A.M. | last post: by
1 post views Thread by R.A.M. | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.