Help converting user input to double

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
 
C

Cowboy \(Gregory A. Beamer\)

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!
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top