GridView change charset on SelectedIndex

I

inga2005

Hi!
I have a very strange problem. I populate a gridview control with a
list containing swedish cities and that looks fine. But once I click
on one of the rows in the gridview to select that specific row the
swedish characters å,ä,ö are translated into rubbish such as ## and
other. Does anyone know why this is happning?
Cheers
/erik
 
E

Eliyahu Goldin

Perhaps some code controling language settings runs only on the first page
load and not in postbacks. Make sure it runs not only when IsPostBack =
false.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Hi!
I have a very strange problem. I populate a gridview control with a
list containing swedish cities and that looks fine. But once I click
on one of the rows in the gridview to select that specific row the
swedish characters å,ä,ö are translated into rubbish such as ## and
other. Does anyone know why this is happning?
Cheers
/erik
 
I

inga2005

Perhaps some code controling language settings runs only on the first page
load and not in postbacks. Make sure it runs not only when IsPostBack =
false.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net


Hi!
I have a very strange problem. I populate a gridview control with a
list containing swedish cities and that looks fine. But once I click
on one of the rows in the gridview to select that specific row the
swedish characters å,ä,ö are translated into rubbish such as ## and
other. Does anyone know why this is happning?
Cheers
/erik

I found it myself. Just add htmlencode="false" to the gridview column
and your safe.
/erik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top