请问下面这两种写法,缓存作用是一样的吗?
1、 <%@ OutputCache Duration="60" VaryByParam="None"%>
2、
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetExpires(DateTime.Now.AddMinutes(1d));
Response.Cache.SetCacheability(HttpCacheability.Public)
}
1、 <%@ OutputCache Duration="60" VaryByParam="None"%>
2、
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetExpires(DateTime.Now.AddMinutes(1d));
Response.Cache.SetCacheability(HttpCacheability.Public)
}
解决方案 »
- .net读取字段
- asp.net(C#) 中如何接收邮件(pop)和解码
- 急,在线等,做的网页上面的图片别人有些看不到,但是点右键点"显示图片"又能显示出来,
- 如何在DataGrid里取得值
- 为什么用户控件中TextBox的值不改变
- 好多问题可以用不同的方法解决,真不知该如何去选择最优的方案
- ●● 如何得到DataSet下的某表中的当前行第几条记录!!!
- web打印的问题 高分送礼!!!!
- 请教关于AntiXSS的问题
- 在一个页面(aspx)里的用户控件怎么才能取得所在页面的 ViewState 值?
- asp.net有哪些好用的短信接口?
- 百分求知 为什么在HttpHandler中得不到HttpContext.Current.Session呢?
http://www.cnblogs.com/z2002m/articles/1271330.html