Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JAE on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

prevent multiple decimal points during textbox input 2

Status
Not open for further replies.

Tobin1

Petroleum
Joined
Nov 9, 2007
Messages
176
Location
US
Howdy All,

I'm looking for a good way to detect if the user has entered more than one decimal point into a TextBox. I'm trying to prevent a error due to multiple decimal points.

This seems like it should be easy and there's probably a bunch of ways to do this, but I've been looking and can't seem to find even one.

I was thinking of trying to get the decimal point (.) count in a string.

Can anyone help?

Thanks

Tobin Sparks
 
Cummings,

What happens if the user enters 15.51.54?

-handleman, CSWP (The new, easy test)
 
handleman,

I'll still catch the erroneous input when the code validates the input after the user pulls the trigger.

I'm still open to a little electrical shock :-) .

Thanks

Tobin Sparks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top