//Json.ashx中代码public void ProcessRequest(HttpContext context){context.Response.ContentType = "text/plain";JavaScriptSerializer json = new JavaScriptSerializer();string js= json.Serialize(new person() { Name="Anby", Age="20"});context.Response.Write(js);}//前台代码
//Ashx代码 public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; var str=context.Request["money"].ToString(); context.Response.Write(str); }//前台js代码