Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross 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
Nov 9, 2007
176
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
 
Replies continue below

Recommended for you

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