zoukankan      html  css  js  c++  java
  • 一般处理应用页中绑定方法代码段

            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();
            }
  • 相关阅读:
    maven引入tomcat插件
    Maven更新jdk1.7
    ehcashe
    response的json
    ajax
    180411
    清空select标签中option选项
    jackson
    ajax
    mysql主从
  • 原文地址:https://www.cnblogs.com/lishidefengchen/p/5221164.html
Copyright © 2011-2022 走看看