I'm writing an ASP.Net MVC4 web application, and I want to calculate the size of some elements using C#.
However, I'm having some trouble because css will only accept percentages as xx.yy%
, that is with a point as the decimal separator, and no space before the percent symbol (as far as I have discovered).
The problem is, I can't find any C# culture that produces this kind of percentages. It seems that English (US) produces the right decimal separator, while German uses the percent symbol correctly (from http://msdn.microsoft.com/en-us/library/shxtf045(v=vs.85).aspx)
Culture: English (United States)
(P) Percent:. . . . . . . -123,456.70 %
Culture: German (Germany)
(P) Percent:. . . . . . . -123.456,70%
Is there one Culture or NumberFormat that is recommended for this, or at least one that consistently works? Or do I need to write my own, and how would I go ahead to do that?