这里是Ajax实际处理界面
<%@ WebHandler Language="C#" Class="ProjectCodeHandler" %>
using System;
using System.Web;
using System.Collections.Generic;
using AmpProjectManager.BLL;
using AmpProjectManager.Models;
public class ProjectCodeHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string html = "";
//在这里,参数获取方式为context.Request.Params["methodType"].ToString()
switch (context.Request.Params["methodType"].ToString())
{
case "code":
html = CodeHandler(context.Request.Params["code"].ToString());
break;
case "user":
break;
}
context.Response.Write(html);
context.Response.End();
}
public bool IsReusable
{
get