Send parameter with accentuation c#

.net, asp.net, c#

Solution

You need to HTML unescape the string, before sending to the DB:

Use HttpUtility.HtmlDecode:

myParam4.Value = HttpUtility.HtmlDecode(row.Cells[0].Text);

Problem

I have an page and in my Send event, I need pass as a parameter an value "Name". But this name have accentuation and, in example for name "Raúl Lozada" sends "`Ra&#250;l Lozada`" to my procedure parameter. How I can correct it? In my HTML page, it loads correctly! ``` <asp:BoundField DataField="User" HeaderText="User" /> SqlParameter myParam4 = oCommand.Parameters.Add("@User", SqlDbType.NChar); myParam4.Value = row.Cells[0].Text; ```

Original source