如何使页面过期.... [英] How to make the page expire....

查看:62
本文介绍了如何使页面过期....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用.Net 1.1。

如何使.aspx页面过期?我想我必须使用HttpCachePolicy类才能获得这个
。但不确定如何使用以及此代码的工作位置。是在

Page_load事件。

谢谢

Veer

解决方案

Response.Expires = 0;


获取或设置在浏览器上缓存页面之前的分钟数

到期。如果用户在到期之前返回同一页面,则会显示

缓存版本。

Bobby Ryzhy

bobby @以下域名:
http://www.weekendtech.net
2004年7月7日星期三12:11:00 -0700,Veeresh < Ve ****** @ hotmail.com>

写道:

我正在使用.Net 1.1。
如何到期一个.aspx页面?我想我必须使用HttpCachePolicy类来实现这个目的。但不确定如何使用以及此代码的工作位置。是否在
Page_load事件中。
谢谢
Veer




我应该在Load_Page中编写此代码吗?活动?

Veer

" Bobby Ryzhy" <峰; br **** @ hotmail.com>在留言中写道

新闻:lb ******************************** @ 4ax.com ...

Response.Expires = 0;

获取或设置在浏览器上缓存页面之前的分钟数
到期。如果用户在到期前返回同一页面,则会显示
缓存版本。

Bobby Ryzhy
bobby @域名下面
http://www.weekendtech.net

2004年7月7日星期三12 :11:00-0700,Veeresh < Ve ****** @ hotmail.com>
写道:

我正在使用.Net 1.1。
如何使.aspx页面过期?我想我必须使用HttpCachePolicy类
这个。但不确定如何使用以及此代码的工作位置。是否在
Page_load活动中。
谢谢
Veer



是的,这是一个合理的地方对于它。


-

我希望这会有所帮助,

Steve C. Orr,MCSD,MVP
http://Steve.Orr.net

" Veeresh" ; < Ve的****** @ hotmail.com>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP11.phx.gbl ...

我应该在Load_Page事件中写下这段代码?

" Bobby Ryzhy" <峰; br **** @ hotmail.com>在消息中写道
新闻:lb ******************************** @ 4ax.com ... < blockquote class =post_quotes> Response.Expires = 0;

获取或设置在浏览器上缓存页面之前的分钟数
到期。如果用户在到期前返回同一页面,则会显示
缓存版本。

Bobby Ryzhy
bobby @域名下面
http://www.weekendtech.net

2004年7月7日星期三12 :11:00-0700,Veeresh < Ve ****** @ hotmail.com>
写道:

我正在使用.Net 1.1。
如何使.aspx页面过期?我想我必须使用HttpCachePolicy


class

forthis。但不确定如何使用以及此代码的工作位置。是否在
Page_load活动中。
谢谢
Veer




I am using .Net 1.1.
How to expire an .aspx page? I think I have to use HttpCachePolicy class for
this. But not sure how to use and where to this code to work. Is it in
Page_load event.
Thanks
Veer

解决方案

Response.Expires = 0;

Gets or sets the number of minutes before a page cached on a browser
expires. If the user returns to the same page before it expires, the
cached version is displayed.

Bobby Ryzhy
bobby@ name of domain below
http://www.weekendtech.net
On Wed, 7 Jul 2004 12:11:00 -0700, "Veeresh" <Ve******@hotmail.com>
wrote:

I am using .Net 1.1.
How to expire an .aspx page? I think I have to use HttpCachePolicy class for
this. But not sure how to use and where to this code to work. Is it in
Page_load event.
Thanks
Veer




Should I write this code in Load_Page event ?
Veer
"Bobby Ryzhy" <br****@hotmail.com> wrote in message
news:lb********************************@4ax.com...

Response.Expires = 0;

Gets or sets the number of minutes before a page cached on a browser
expires. If the user returns to the same page before it expires, the
cached version is displayed.

Bobby Ryzhy
bobby@ name of domain below
http://www.weekendtech.net
On Wed, 7 Jul 2004 12:11:00 -0700, "Veeresh" <Ve******@hotmail.com>
wrote:

I am using .Net 1.1.
How to expire an .aspx page? I think I have to use HttpCachePolicy class forthis. But not sure how to use and where to this code to work. Is it in
Page_load event.
Thanks
Veer



Yes that''s a reasonable place for it.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Veeresh" <Ve******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...

Should I write this code in Load_Page event ?
Veer
"Bobby Ryzhy" <br****@hotmail.com> wrote in message
news:lb********************************@4ax.com...

Response.Expires = 0;

Gets or sets the number of minutes before a page cached on a browser
expires. If the user returns to the same page before it expires, the
cached version is displayed.

Bobby Ryzhy
bobby@ name of domain below
http://www.weekendtech.net
On Wed, 7 Jul 2004 12:11:00 -0700, "Veeresh" <Ve******@hotmail.com>
wrote:

I am using .Net 1.1.
How to expire an .aspx page? I think I have to use HttpCachePolicy

class

forthis. But not sure how to use and where to this code to work. Is it in
Page_load event.
Thanks
Veer




这篇关于如何使页面过期....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆