asp.net jquery getjson 传递中文参数乱码问题

 
    刚开始搜索了很多,找到JAVA的,没找到.NET的, 后面根据JAVA的,大概写了个,
前台传递参数的时候要编码

例子:

   var selectval = encodeURIComponent($("#select_yz").find("option:selected").text());

 

后台获取参数的时候要解码

例子:

 HttpContext.Current.Server.UrlDecode(HttpContext.Current.Request.QueryString["protype"]);

posted @ 2013-07-24 19:29  StormeR  阅读(323)  评论(0编辑  收藏  举报