Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Page expiration

Reply
Thread Tools

Page expiration

 
 
Ken
Guest
Posts: n/a
 
      11-01-2003
After searching through the visual studio .net help, and
searching on the web, I cannot find a difinitive way to
make a page expire so that when a user clicks on the back
button, the browser displays the "page has expireded"
message. I've not found any combinations of
response.cache members that provide for this
functionality. I'd appreciate any help.
 
Reply With Quote
 
 
 
 
S Gopikrishna
Guest
Posts: n/a
 
      11-01-2003
Hi

Try the following code

response.Cache.Setexpires(somepastdate)
response.cache.setcacheability(Httpcacheability.no cache)

- Gopi
 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      11-01-2003
Gopi,

With this code in the page_load event

System.DateTime dt = new DateTime
(1961, 1, 5, 1, 1, 1, 1);
Response.Cache.SetExpires(dt);
Response.Cache.SetCacheability
(HttpCacheability.NoCache);


I can bring up the page, navigate to a different page,
then click my browsers back button and the page displays,
no "this page has expired message".

>-----Original Message-----
>Hi
>
>Try the following code
>
>response.Cache.Setexpires(somepastdate)
>response.cache.setcacheability(Httpcacheability.n ocache)
>
>- Gopi
>.
>

 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      11-02-2003
Try this code:

Response.Expires = 0
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com



"Ken" <(E-Mail Removed)> wrote in message
news:002501c3a093$f4388f90$(E-Mail Removed)...
> After searching through the visual studio .net help, and
> searching on the web, I cannot find a difinitive way to
> make a page expire so that when a user clicks on the back
> button, the browser displays the "page has expireded"
> message. I've not found any combinations of
> response.cache members that provide for this
> functionality. I'd appreciate any help.



 
Reply With Quote
 
Guest
Posts: n/a
 
      11-03-2003
Super! This works.

Thanks for the help.
>-----Original Message-----
>Try this code:
>
>Response.Expires = 0
>Response.Cache.SetNoStore()
>Response.AppendHeader("Pragma", "no-cache")
>
>--
>I hope this helps,
>Steve C. Orr, MCSD, MVP
>http://Steve.Orr.net
>Hire top-notch developers at http://www.able-

consulting.com
>
>
>
>"Ken" <(E-Mail Removed)> wrote in

message
>news:002501c3a093$f4388f90$(E-Mail Removed)...
>> After searching through the visual studio .net help,

and
>> searching on the web, I cannot find a difinitive way to
>> make a page expire so that when a user clicks on the

back
>> button, the browser displays the "page has expireded"
>> message. I've not found any combinations of
>> response.cache members that provide for this
>> functionality. I'd appreciate any help.

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Page Expiration... Mustufa Baig ASP .Net 4 04-05-2005 03:17 PM
Page Expiration Nitin ASP .Net 2 03-03-2005 10:33 PM
Page expiration - Is it with Session.Timeout naijacoder naijacoder ASP .Net 3 09-09-2004 12:59 PM
Page expiration warning on back navigation Josh Anderson - remove Zs to reply ASP .Net 1 11-19-2003 04:28 AM
Posting Again- Redirecting to Login page while session expiration Vijay ASP .Net 3 11-04-2003 03:36 AM



Advertisments