0

I have this entry in my db:

tést

What I get from the user is:

"tést"

and when I'm searching it in db I get null results, because it doesn't exist. How to convert é to é?

This is my code:

(from x in db.tblMyTable where x.name == "tést" select x)

I use entity framework.

petko_stankoski
  • 10,459
  • 41
  • 127
  • 231
  • 3
    "When I'm seaching it in the db"... Which DB? How are your "searching". Where's your code? – spender Jan 25 '13 at 15:42
  • possible duplicate of [Converting & to & etc](http://stackoverflow.com/questions/1562360/converting-amp-to-etc) – spender Jan 25 '13 at 15:44

1 Answers1

3

To convert that string, you would use the HtmlDecode method:

str = Server.HtmlDecode(str);

However, you should look into why the value comes HTML encoded when it really shouldn't.

Guffa
  • 687,336
  • 108
  • 737
  • 1,005