页面代码:
public class Handler1 : IHttpHandler { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; //context.Response.Write("Hello World"); string Name = context.Request.QueryString["Name"]; if (!String.IsNullOrEmpty(Name)) { if (Name.Length < 2) { context.Response.Write("smallLength"); } else { context.Response.Write("exist"); } // Maticsoft.BLL.Personnel person = new Maticsoft.BLL.Personnel(); // Maticsoft.Model.personnelDate personDate = person.GetModel(Name); //if (personDate != null) //{ // context.Response.Write("exist"); //} } else { context.Response.Write("validateNull"); } } public bool IsReusable { get { return false; } } }