I have an async webform with globalization.
Code:<%@ Page Async="true" ...In this page, I have a gridview. The datasource of the gridview is some data of a 3th party webservice. This webservice is invoked async. When I open this page with Dutch cultureInfo, I've noticed that all is in Dutch, except the content of the Gridview (except the headers).Code:protected override void InitializeCulture() { string culture = ""; if (Request.QueryString["ci"] != null) culture = Request.QueryString["ci"]; System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(culture); System.Threading.Thread.CurrentThread.CurrentCulture = ci; System.Threading.Thread.CurrentThread.CurrentUICulture = ci; base.InitializeCulture(); }
After debugging I found out that in the gridview's RowDataBound event the System.Threading.Thread.CurrentThread.CurrentCulture is reset to 'en-US'.
Any idea why this happens and how to prevent this from happening?


Reply With Quote