title: ASP.NET: Changing a site's culture programmatically
body: <p>i'm trying to set my website's culture programmatically, so when a user clicks a button they can change the text on the page from english to spanish. here's my code:</p>
  
  <pre><code>protected void btnChangeLanguage(object sender, EventArgs e)
  {
      Thread.CurrentThread.CurrentCulture = new CultureInfo("es");
      Thread.CurrentThread.CurrentUICulture = new CultureInfo("es);
  }
  
  &lt;asp:Label ID="lblDisplay" runat="server" meta:ResourceKey="lblDisplay" /&gt;
  
  &lt;asp:Button ID="btnChangeLanguage" runat="server" Text="Change Language"
          OnClick="btnChangeLanguage_Click" /&gt;
  </code></pre>
  
  <p>i have a Default.aspx.resx file with a key/value of: lblDisplay.text/English
  and a Default.aspx.es.resx file with a key/value of: lblDisplay.text/Espanol</p>
  
  <p>i can't get my Label's text to change from "English" to "Spanish". anyone see what i'm doing wrong?</p>