Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. æøå characters

æøå characters

Scheduled Pinned Locked Moved C#
questiondatabasehelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Genbox
    wrote on last edited by
    #1

    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 ?

    M 1 Reply Last reply
    0
    • G Genbox

      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 ?

      M Offline
      M Offline
      mikailcetinkaya
      wrote on last edited by
      #2

      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

      G 1 Reply Last reply
      0
      • M mikailcetinkaya

        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

        G Offline
        G Offline
        Genbox
        wrote on last edited by
        #3

        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.

        M 1 Reply Last reply
        0
        • G Genbox

          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.

          M Offline
          M Offline
          mikailcetinkaya
          wrote on last edited by
          #4

          try onload manually declaring encoding like Response.encoding="XXXXX" Mikail Çetinkaya . The C# DEveloper

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups