æøå characters
-
Hi. I have a problem with the danish characters æøå, when i exstract them from my database and put them into a gridview (with the database as datasource) then the characters is fine. but if i take the result from the gridview and put it into another gridview with a textbox in its footer, then it's all weird. this is the code that makes trouble: TextBox txtFood = GridView1.FooterRow.FindControl("txtFood") as TextBox; txtFood.Text = GridView2.SelectedRow.Cells[0].Text; if i print GridView2.SelectedRow.Cells[0].Text as this: Response.Write(GridView2.SelectedRow.Cells[0].Text); it returns the correct characters (æøå) so does the textbox if i print it out like this: TextBox txtFood = GridView1.FooterRow.FindControl("txtFood") as TextBox; txtFood.Text = GridView2.SelectedRow.Cells[0].Text; Respomse.Write(txtFood.Text); So how can it be weird characters like æ ? is it the ASCII code or something? how do i view the æøå correct in the textbox on my webpage ?
-
Hi. I have a problem with the danish characters æøå, when i exstract them from my database and put them into a gridview (with the database as datasource) then the characters is fine. but if i take the result from the gridview and put it into another gridview with a textbox in its footer, then it's all weird. this is the code that makes trouble: TextBox txtFood = GridView1.FooterRow.FindControl("txtFood") as TextBox; txtFood.Text = GridView2.SelectedRow.Cells[0].Text; if i print GridView2.SelectedRow.Cells[0].Text as this: Response.Write(GridView2.SelectedRow.Cells[0].Text); it returns the correct characters (æøå) so does the textbox if i print it out like this: TextBox txtFood = GridView1.FooterRow.FindControl("txtFood") as TextBox; txtFood.Text = GridView2.SelectedRow.Cells[0].Text; Respomse.Write(txtFood.Text); So how can it be weird characters like æ ? is it the ASCII code or something? how do i view the æøå correct in the textbox on my webpage ?
it is all about that textbox viewState data. your controls doesnot take proper encodings to store viewstate data , agressively inspect properties of them and use a html textbox control Mikail Çetinkaya . The C# DEveloper
-
it is all about that textbox viewState data. your controls doesnot take proper encodings to store viewstate data , agressively inspect properties of them and use a html textbox control Mikail Çetinkaya . The C# DEveloper
-
so how do i change the controls so that it can store the viewstate data correctly ? I code ASP.net and C# in a website, i dont know how to send the data from a gridview to a normal html textbox control.
try onload manually declaring encoding like Response.encoding="XXXXX" Mikail Çetinkaya . The C# DEveloper