• 重构oninit,应用在模式窗口的方法


    因为用到模式窗口,所以在BasePage中重构ONINIT,用来去缓存和窗口的打开设置 :)
     1protected override void OnInit(EventArgs e)
     2        {
     3            System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("zh-CN");
     4
     5            Response.Buffer = true;
     6            Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds( -1 );
     7            Response.Expires = 0;
     8            Response.CacheControl = "no-cache";
     9
    10            string style = "<link rel=\"stylesheet\" href=\"" + GlobalVar.CSSName + "\">\n"; //CSSName = "css/default.css"
    11            style += "<base target=\"_self\">\n";
    12            Response.Write(style);
    13
    14            string nocache = "<meta http-equiv=\"pragma\" content=\"no-cache\">\n";
    15            nocache += "<meta http-equiv=\"cache-control\" content=\"no-cache, must-revalidate\">\n";
    16            nocache += "<meta http-equiv=\"expires\" content=\"WED, 26 Feb 1997 08:21:57 GMT\">\n";
    17            Response.Write(nocache);
    18
    19            this.Load += new System.EventHandler(this.BasePage_Load);
    20        }
  • 相关阅读:
    校软第二次考核11.11
    计算机视觉入门live笔记
    大数阶乘题解
    校软招新考试 原卷 题解
    校软件班招新考试A卷 题解
    【好题】最短路变形+dp——ICPC NCNA 2018G
    贪心/二分——cf1342D
    思维+贪心+dp——cf1341D
    【经典】容斥+排列组合——cf1342E
    计算几何+求质心+求多边形与圆交面积——ICPC GNYR 2019
  • 原文地址:https://www.cnblogs.com/zjy/p/484317.html
Copyright © 2020-2023  润新知