Help converting user input to double

  • Thread starter Thread starter Torben Laursen
  • Start date Start date
T

Torben Laursen

Hi

I have a problem that should be simple but I have been unable to solve it

The users of my homepage is all over the planet and they all enter numbers
in texbox's and I give them some numbers back

But how do I make sure that my server allways read the values correct no
matter if the user writes 10.1 or 10,1?

Thanks Torben
 
You have a couple of choices:

1. Turn commas into periods prior to setting the double.
2. Use globalization.

Most likely you will need to do both as some users do not set their language
properly, which throws off globalization/localization.

Hope this helps.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think Outside the Box!
*************************************************
 
Back
Top