Hi everybody, The task is to format currency on web pages according to settings in Regional Options on the Web server. This settings might be changed by admin at any time and must be applied in web pages immediately. I created a simple test application with
only a label on a page. Put the follow code: NumberFormatInfo nfi = Thread.CurrentThread.CurrentCulture.NumberFormat; double d = 456789.45; Label1.Text = d.ToString("C",nfi); The result is "456 789,00" - ok (default culture is Russian) Then changed in Regional
Options the Currency Grouping Symbol to "F" instead of " ", so I expext to see "456F789,45", but the result hasn't changed!!!! Any user changes are not applied in web pages (even after server reload), however, this code works properly in WinForms! No arcticle
about the problem in Technet/MSDN, only sample to use Thread.CurrentThread.CurrentCulture to get cultute. :-( How could I manage this?
miksh
Member
36 Points
58 Posts
Can't do simple thing - get user's settings from Regional Options
Mar 16, 2004 07:41 AM|LINK