前台:
$.post("GenericHandler/appointment_assess_Count.ashx", { action: "GetSchoolAddress" }, function (dataDZ) {}, "Json");
$.post("GenericHandler/appointment_assess_Count.ashx", { action: "GetMajorType" }, function (data) {}, "Json");
一般处理程序中:
public void ProcessRequest(HttpContext context)
{
context.Response.Clear();
context.Response.ContentType = "text/html";
string action = context.Request["action"].ToString();
if (action == "GetMajorType")
{
GetMajorType(context);
}
else if (action == "GetSchoolAddress")
{
GetSchoolAddress(context);
}
}
public void GetMajorType(HttpContext context)
{
context.Response.Write(Tool.ToJson(dblist));
}
public void GetSchoolAddress(HttpContext context)
{
context.Response.Write(Tool.ToJson(dblist));
}
多个ajax调用同一个 一般处理程序
最新推荐文章于 2022-11-12 11:07:08 发布