Groups | Blog | Home
all groups > dotnet web services > may 2006 >

dotnet web services : commas instead of dots???


David++
5/25/2006 6:11:02 AM
Hi folks,

Just been having a play with my .net server space and have added a few basic
web forms and a couple of web services. I noticed that when I return double
precision values from the server and display these, the decimal point is
replaced by a comma?

For example,

51,12345 is returned instead of 51.12345

This problem also occurs sending double precision values to the server for
processing. If I want to pass 51.12345 to the server, the web form fails to
display, but if I pass 51,12345 i.e. with the comma, then it works fine?

Anyone have an idea what the deal is with this comma replacement thing which
is going on??

Thanks for any ideas,

Best Regards,
WoodenSWord
5/25/2006 7:02:02 AM
David hi,

..net by default uses the computer's regional settings for the decimal
character and the thousand operand.
You should check Control panel/Regional Settings.

[quoted text, click to view]
David++
5/25/2006 7:57:02 AM
[quoted text, click to view]
hi wooden sword,

thanks for your reply. yes you are right regional settings is the problem. i
found this article which explains how to define the regional settings or
'Culture' for individual asp pages, this seemed to do the trick for me.

http://msdn2.microsoft.com/en-US/library/bz9tc508.aspx

Cheers,
AddThis Social Bookmark Button