您的位置:首页 > Web前端 > JQuery

Jquery异步请求简单实例(转)

2014-02-21 16:52 267 查看

本文引用自Xingsoft


一、Jquery向aspx页面请求数据

前台页面JS代码:

View Code



<%@ WebHandler Language="C#" Class="Handler" %>

using System;
using System.Web;

public class Handler : IHttpHandler {

public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/json";
context.Response.Write("{\"msg\":\"Hello World"+context.Request["name"]+"来自handler.ashx\"}");
context.Response.End();
}

public bool IsReusable {
get {
return false;
}
}

}

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: