1.在js里往aspx页面传值 用js自带的encodeURI()方法处理一下 示例
window.showModelessDialog(encodeURI("aa.aspx?r=随机数字"), self, "center:yes; scroll:no; help:no; dialogwidth:406px; dialogheight:340px");
2.Ajax 在js里调用.ashx文件 在.ashx文件里这样写
public void ProcessRequest (HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Request.ContentEncoding = Encoding.GetEncoding("gb2312");
...
}