Last post Apr 15, 2012 10:54 AM by Digitborn.com
Jun 25, 2011 10:24 AM|Digitborn.com|LINK
On the same code, when i run my asp.net application on ASP.NET Development Server lists my double values as 154,35 and on my IIS localhost as 154.35. Why is that? How to change it? I'd like to have it as 154.35. In my code I use:
Jun 25, 2011 04:05 PM|Shellymn|LINK
Please try the soultion mentioned in the below thread.
Jun 25, 2011 06:12 PM|Digitborn.com|LINK
No, it didn't help.
Doing some more tests i recognized that the problem is not exactly as it was described first. The problem exist
only on an application where i have an iframe and it's run on ASP.NET Development Server. The same thing on IIS is showing the values with dot ".", not with coma ",". Putting breakpoints the values
into the DataSet.DataTable are correctly with dot. In this iframe i've got asp:ListView with Label controls.
Any suggestion on that?
Jun 28, 2011 08:43 AM|Yanping Wang - MSFT|LINK
Thanks for your post.
Please try using System.Globalization.CultureInfo.CreateSpecificCulture("en-US").InvariantCulture
Hope this helps, thanks.
Jun 28, 2011 09:41 AM|Digitborn.com|LINK
How to use it? At the moment i have code like:
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(System.Globalization.CultureInfo.CreateSpecificCulture("en").Name, false);
DataRow dr = this._fResults.Tables.NewRow();
dr = Convert.ToDouble(obj.Price1[x], ci.NumberFormat);
Apr 15, 2012 10:54 AM|Digitborn.com|LINK
I found the answer to the question. The easies thing (in WinXP) is to go to Control Panel -> "Date, Time, Language and Region Options" -> "Regional and Language Options" -> "Regional Options" tab -> Customize button -> Decimal symbol change from "," to ".".