Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Setting Page Expiration...

Reply
Thread Tools

Setting Page Expiration...

 
 
Mustufa Baig
Guest
Posts: n/a
 
      04-01-2005
Hi,

Whenever the user clicks on Back Button, I want that page to be reloaded or
refreshed. Basically I don't want my page to be cached. How can I acheive
this functionality in asp.net?

Regards,



 
Reply With Quote
 
 
 
 
Mike Douglas
Guest
Posts: n/a
 
      04-01-2005
Hi,

You can put this in your page_load

Response.Cache.SetCacheability(HttpCacheability.No Cache)
Response.Cache.SetAllowResponseInBrowserHistory(fa lse)

This will make the so the page is expired.

I hope this helps.

Mike Douglas

www.doitconsultants.com

On Fri, 1 Apr 2005 14:59:04 -0500, "Mustufa Baig"
<(E-Mail Removed)> wrote:

>Hi,
>
>Whenever the user clicks on Back Button, I want that page to be reloaded or
>refreshed. Basically I don't want my page to be cached. How can I acheive
>this functionality in asp.net?
>
>Regards,
>
>


 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      04-02-2005
This will ensure the page doesn't get cached.

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

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"Mustufa Baig" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> Whenever the user clicks on Back Button, I want that page to be reloaded
> or
> refreshed. Basically I don't want my page to be cached. How can I acheive
> this functionality in asp.net?
>
> Regards,
>
>
>



 
Reply With Quote
 
Mustufa Baig
Guest
Posts: n/a
 
      04-05-2005
Hi Mike,

I tried but the following is nt valid:

Response.Cache.SetAllowResponseInBrowserHistory(fa lse)

Thanks.

"Mike Douglas" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> You can put this in your page_load
>
> Response.Cache.SetCacheability(HttpCacheability.No Cache)
> Response.Cache.SetAllowResponseInBrowserHistory(fa lse)
>
> This will make the so the page is expired.
>
> I hope this helps.
>
> Mike Douglas
>
> www.doitconsultants.com
>
> On Fri, 1 Apr 2005 14:59:04 -0500, "Mustufa Baig"
> <(E-Mail Removed)> wrote:
>
> >Hi,
> >
> >Whenever the user clicks on Back Button, I want that page to be reloaded

or
> >refreshed. Basically I don't want my page to be cached. How can I acheive
> >this functionality in asp.net?
> >
> >Regards,
> >
> >

>



 
Reply With Quote
 
Mustufa Baig
Guest
Posts: n/a
 
      04-05-2005
Hi Steve,

Response.Expires = 0 is provided for backward compatibility. Whats the new
way of getting this functionality?

Thanks.

"Steve C. Orr [MVP, MCSD]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> This will ensure the page doesn't get cached.
>
> Response.Expires = 0
> Response.Cache.SetNoStore()
> Response.AppendHeader("Pragma", "no-cache")
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
> "Mustufa Baig" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi,
> >
> > Whenever the user clicks on Back Button, I want that page to be reloaded
> > or
> > refreshed. Basically I don't want my page to be cached. How can I

acheive
> > this functionality in asp.net?
> >
> > Regards,
> >
> >
> >

>
>



 
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 the value of a Master page's control's property using a property of the Master page Nathan Sokalski ASP .Net 25 03-04-2010 03:42 AM
Setting master page properties from custom base page William Youngman ASP .Net 3 04-02-2007 02:46 PM
setting the text value of a control on the master page, from a content page Aussie Rules ASP .Net 5 07-25-2006 01:32 AM
Setting the Page Title using local resources for a content page in a master page Laith Zraikat ASP .Net 3 07-06-2006 01:23 AM
Setting a new page as Home Page yudi ASP .Net 2 06-06-2006 04:24 PM



Advertisments