Q:

Double ToString("C") culture specific

I know that this works (source):
double x = 9.7;
x.ToString("C", CultureInfo.CreateSpecificCulture("nl-NL"));

But I have this code in my code behind:
System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-GB");

and in my aspx webform, I'd like to use double.tostring("C") so no cultureinfo there. Because it is set on the current thread. But the local machine is nl-NL. The CurrentThread is set to en-GB in the code behind, but the valutasign is still a euro sign instead of pound.
Am I missing something? Or is using the overload of tostring with the cultureinfo required? In other words, do I have to rewrite all double tostrings to use cultureinfo?

A:

Make sure you initialize the culture soon enough in the page life cycle.  In fact, there's even a method for you to override specially for this purpose: Page.InitializeCulture.
Example based on a cookie:
    protected override void InitializeCulture()
    {
        var cookie = Request.Cookies[WebConfigurationManager.AppSettings["LocaleCookieName"]];
        if (cookie != null)
            Culture = UICulture = cookie.Value;
    }

No need to call the base method, see the documentation for more information.

