惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
D
Docker
月光博客
月光博客
MongoDB | Blog
MongoDB | Blog
Vercel News
Vercel News
美团技术团队
博客园 - 叶小钗
I
InfoQ
Jina AI
Jina AI
博客园 - 司徒正美
雷峰网
雷峰网
B
Blog
Y
Y Combinator Blog
A
About on SuperTechFans
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Recent Announcements
Recent Announcements
V
V2EX
N
Netflix TechBlog - Medium

博客园 - ZmStudio.CN

非常用的着的HTML标签,为代码网页减肥! 对ASP.NET中关于事件委托的理解 权限设计[摘录] c#中out和ref的使用级区别 Loading... 到 链接颜色的渐变 C# 中数据类型转换 Windows\explorer.com 等特症的病毒 - ZmStudio.CN - 博客园 今天用vs2005实践了写自己的WEB控件,继承自panel AJAX基础教程 硬盘分区整数G计算公式[转] 收集的几个超经典的程序(不得不佩服老外的智商) 将asp.net1.1的应用程序升级到asp.net2.0的一点心得 Automation服务器不能创建对象问题 从...中检测到有潜在危险的 Request.Form 值的解决办法 (转载)Worm.QQ.TopFox病毒信息 怎样在数据绑定到DATAGRID之前,先判断其中一个字段是否为空? 第一次用联接查询语句,豁然开朗!! 深入剖析VB.NET变量的使用 简单应用程序命名规则
重构oninit,应用在模式窗口的方法
ZmStudio.CN · 2006-11-10 · via 博客园 - ZmStudio.CN

因为用到模式窗口,所以在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        }

值得收藏