User1872364149 posted
Hi there, I hope in your help.
I have problem with set language in c# application connected on a MySQL db.
The server in use is a Windows Server 2003 in english language.
I need set the output of query in first column of GridView in RowDataBound in german language.
If try the same solution in c# application the output is only english.
This is beginning to make me believe my structure as a whole is not correct.
What am I missing ?
I would greatly appreciate any help you can give me in working this problem.
My code below:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (!string.IsNullOrEmpty(Request.QueryString["Month"]))
{
InitializeCulture();
e.Row.Cells[0].Text = string.Format(CultureInfo.CurrentCulture, "{0:MMMM yyyy}", DataBinder.Eval(e.Row.DataItem, "Month"));
}
}
}
protected override void InitializeCulture()
{
Page.Culture = "de-DE";
Page.UICulture = "de-DE";
}