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ú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;
You need to HTML unescape the string, before sending to the DB:
Use HttpUtility.HtmlDecode:
myParam4.Value = HttpUtility.HtmlDecode(row.Cells[0].Text);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With