I have to display content (specially currencies) in the Users local format.
Currently Iam doing below in my code (VB.NET)
----------------------------------------------------------------------------------
Imports System.Web
Imports System.Web.Mail
Imports System.Net
Imports System.IO
Imports System.Globalization
Imports System.Threading
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim sLang As String
sLang = Request.UserLanguages(0)
Thread.CurrentThread.CurrentCulture = New CultureInfo(sLang)
End Sub
-----------------------------------------------------------------------------------------
My PC had US regional settings ... but I changed it to United Kingdom for
testing purpose by going to Settings>>control panel>>Regional settings . I
even rebooted my PC just to make sure .
If I do String.Format("{0:c}", 0) somehwhere in my code it displays as
$0.00 instead of £0.00 on the page
CUrrently my PC is running Windows 2000 professional. I am running the
application as localhost
Any Ideas of what I may be doing wrong......?
Thanks in advance
MasterGaurav - 07 Mar 2005 06:37 GMT
Check you Internet Explorer options:
Tools -> Internet Options -> Languages
It's possible that both of them are listed with en_UK at top.
--
Cheers,
Gaurav Vaish
http://www.mastergaurav.org
http://mastergaurav.blogspot.com
----------------------------