|
-
January 27th, 2009, 03:05 PM
#1
[RESOLVED] Prevent Two Decimal Points in Textbox?
Hi folks,
I have some textboxes for the entry of numbers.
I am parseing the textbox contents into double variables for calculations in the TextChanged event.
I have already used the KeyPress events to prevent any character entry other than zero to nine, the back keys, and the decimal point.
But if more than one decimal point is entered, obviously the program throws an exception.
Does anyone know how this is usually dealt with to prevent a second decimal point in the textbox?
Thankyou for any advice.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|