using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Web;
namespace MyWeb
{
/// <summary>
/// GetMsg 的摘要说明
/// </summary>
public class GetMsg : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
String fn=context.Request["fn"];
//根据参数判断执行哪一个方法
switch(fn){
case "Search":
Search(context);
break;
case "Search":
Add(context);
break;
}
}
public void Search(HttpContext context)
{
context.Response.Write("新增");
}
public void Add(HttpContext context)
{
context.Response.Write("新增");
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
asp.net一般处理程序利用反射定位方法
最新推荐文章于 2019-07-18 16:30:06 发布