private HttpRequest Request; private HttpResponse Response; public void ProcessRequest(HttpContext context) { //不让浏览器缓存 context.Response.Buffer = true; context.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1); context.Response.AddHeader("pragma", "no-cache"); context.Response.AddHeader("cache-control", ""); context.Response.CacheControl = "no-cache"; context.Response.ContentType = "text/plain"; Request = context.Request; Response = context.Response; string method = Request["Method"].ToString(); MethodInfo methodInfo = this.GetType().GetMethod(method); methodInfo.Invoke(this, null); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string method = context.Request.Params["method"]; switch (method) { case "CheckShareReName": CheckShareReName(context); break; case "GetIDByShareTitle": GetIDByShareTitle(context); break; case "SaveClick": SaveClick(context); break; case "DeleteShareContractRelation": DeleteShareContractRelation(context); break; case "IsNeedHideButton": IsNeedHideButton(context); break; default: break; } context.Response.End(); }