CompareValidator and Currency

liptonIcedTea

Well-known member
Joined
Jan 18, 2007
Messages
89
Programming Experience
1-3
Hi,

I have a textbox and a compareValidator thats doing a DataTypeCheck to check whether this Text Box is of data type Currency.

I have a requirement that this textbox displays a currency (eg. it displays a "$" at the start and "," every 3 numbers)

If I just enter a number, it validates okay, however, if I enter a currency such as $1,476, then validation fails.

Is this the proper behaviour? If so, what's the difference between data-checking a double or a currency?

Finally, is it actually possible to have the textbox display it in currency format (eg. $1,000) and still check whether it's a currency?

Thank you
 
Hi,

I have a textbox and a compareValidator thats doing a DataTypeCheck to check whether this Text Box is of data type Currency.

I have a requirement that this textbox displays a currency (eg. it displays a "$" at the start and "," every 3 numbers)

If I just enter a number, it validates okay, however, if I enter a currency such as $1,476, then validation fails.

Is this the proper behaviour? If so, what's the difference between data-checking a double or a currency?

Finally, is it actually possible to have the textbox display it in currency format (eg. $1,000) and still check whether it's a currency?

Thank you


Make use of "CustomValidator"
 
Back
Top