Massimiliano

Massimiliano

  • NA
  • 3
  • 2.3k

Pass a chinese string from ajax to C# Server

Feb 9 2012 9:02 AM
hi everyone. I am attempting to send a string in chinese characters via ajax in jquery.

var idStud = $("#idStud").val();
var descr = $("#test").val();

$.ajax({
contentType: "application/text; charset=utf-8",
url: "ajaxStud.aspx?op=insert&idStud=" + idStud + "&descr=" + descr,
success: function(data) {
}
});

If I alert the string out before the ajax call i.e. alert(descr), I see the characters correctly.
When i retrieve in ajaxStud.aspx.cs the Request.Querystring["descr"] the string does not show the proper chinese characters but only "????????"
What is causing this problem and how can I resolve it? Many thanks!

Answers (1)