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

推荐订阅源

Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
量子位
G
Google Developers Blog
J
Java Code Geeks
N
Netflix TechBlog - Medium
博客园 - 聂微东
宝玉的分享
宝玉的分享
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
雷峰网
雷峰网
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss

博客园 - 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        }

值得收藏