When Compromise Is Not An Option

导航

<2006年8月>
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789

统计

公告

这里内容虽然还不精彩,但每篇文章都是原创,望大家和我讨论问题。您的每一个评论,都是我的动力,我一定并虚心接受批评和鼓励。
联系方式:
MAIL:
zaluao#gmail.com

终于复制了discuz的框架 8-20 13:22

与我联系

搜索

 

常用链接

留言簿(1)

我参加的小组

我参与的团队

我的标签

随笔分类

文章分类

最新随笔

最新评论

  • 1. re: 防SQL注入
  • 用正则表达式匹配处理效率高些, 你这样在请求里查找你自己定义的数组字符, 字符多了会慢。
  • --cothly

阅读排行榜

评论排行榜

重构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        }

posted on 2006-08-23 14:03 老尧 阅读(517) 评论(3)  编辑 收藏 所属分类: .NET SKILL

评论

#1楼  2006-08-23 18:45 super_man [未注册用户]

解决模式窗口经常出现的问题   回复  引用    

#2楼  2006-08-24 17:48 main      

大帅哥终于发表大作了!   回复  引用  查看    

#3楼 [楼主] 2006-08-25 08:08 尧尧      

-_-! 随便贴了一下BASEPAGE里的内容 -_-!   回复  引用  查看