i posting form sends email, html part of email body created , posted jquery , ajax post method web method in asp.net using vb.
here's snippet
var tbl = $('<table/>'); var paymentcell = $('<td/>').html('£' + thisamount).appendto(row); $(row).appendto(tbl); // generates element in question this, amongst other things posted data variable ajax, data variable looks this:
var data = '{ "emailhtml":"' + escape((wrap).html()) + '"}'; this decoded on server side this:
emailhtml = httputility.urldecode(emailhtml) this works fine except pound signs, not decoded properly. have tried using £ per above, , £ display html characters getting weird ? symbol returned in html decoded @ server end... there way round this?
have tried without escape() call, jquery allows built-in encoding, think value being double-encoded.
make sure using utf-8 encoding , charset in application, this:
web.config:
<system.web> <globalization requestencoding="utf-8" responseencoding="utf-8" /> </system.web> html pages:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
Comments
Post a Comment