Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: content expiration?

Reply
Thread Tools

Re: content expiration?

 
 
Daenil of GL
Guest
Posts: n/a
 
      02-25-2004
Thank you for your reply.
On the Response.Cache.SetCacheability(HttpCacheablility.N ocache), would that
go in the old "Spaghetti Code" render blocks or something else? That is the
part that loses me.

"Teemu Keiski" <(E-Mail Removed)> wrote in message
news:eMniTM3%(E-Mail Removed)...
> You can set in Page directive
> <% @Outputcache Location="none" %>
>
> which should set the headers and you can do that in code:
>
> Response.Cache.SetCacheability(HttpCacheability.No Cache)
>
> --
> Teemu Keiski
> MCP, Microsoft MVP (ASP.NET), AspInsiders member
> ASP.NET Forum Moderator, AspAlliance Columnist
>
>
>
>
>
> "Daenil of GL" <webmaster@!nospam.visualsun.ws> wrote in message
> news:(E-Mail Removed)...
> > Ok, I am looking for how you make a webpage expire immediately so when

you
> > hit refresh, you receive new data. In old ASP, you would just do
> > <%
> > Response.Expires = 60
> > Response.Expiresabsolute = Now() - 1
> > Response.AddHeader "pragma","no-cache"
> > Response.AddHeader "cache-control","private"
> > Response.CacheControl = "no-cache"
> > %>
> > Since that no longer works in ASP.NET, I was looking for how you do this
> > now...
> >
> > Thanks,
> > Daniel Gormley
> > Visual SUN Studios
> >
> >

>
>



 
Reply With Quote
 
 
 
 
Daenil of GL
Guest
Posts: n/a
 
      02-25-2004
Here is what i have tried and it doesnt work:

<%@ outputcache duration="60" varybyparam="None" %>
<% Response.Cache.SetCacheability(HttpCacheability.No Cache) %>
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader ("Pragma", "no-cache") %>
<% Response.Expires = -1 %>

This is in the very top of my page right under the <%@ Page Language="VB" %>

What am i doing wrong?

"Daenil of GL" <webmaster@!nospam.visualsun.ws> wrote in message
news:OPnjiI4%(E-Mail Removed)...
> Thank you for your reply.
> On the Response.Cache.SetCacheability(HttpCacheablility.N ocache), would

that
> go in the old "Spaghetti Code" render blocks or something else? That is

the
> part that loses me.
>
> "Teemu Keiski" <(E-Mail Removed)> wrote in message
> news:eMniTM3%(E-Mail Removed)...
> > You can set in Page directive
> > <% @Outputcache Location="none" %>
> >
> > which should set the headers and you can do that in code:
> >
> > Response.Cache.SetCacheability(HttpCacheability.No Cache)
> >
> > --
> > Teemu Keiski
> > MCP, Microsoft MVP (ASP.NET), AspInsiders member
> > ASP.NET Forum Moderator, AspAlliance Columnist
> >
> >
> >
> >
> >
> > "Daenil of GL" <webmaster@!nospam.visualsun.ws> wrote in message
> > news:(E-Mail Removed)...
> > > Ok, I am looking for how you make a webpage expire immediately so when

> you
> > > hit refresh, you receive new data. In old ASP, you would just do
> > > <%
> > > Response.Expires = 60
> > > Response.Expiresabsolute = Now() - 1
> > > Response.AddHeader "pragma","no-cache"
> > > Response.AddHeader "cache-control","private"
> > > Response.CacheControl = "no-cache"
> > > %>
> > > Since that no longer works in ASP.NET, I was looking for how you do

this
> > > now...
> > >
> > > Thanks,
> > > Daniel Gormley
> > > Visual SUN Studios
> > >
> > >

> >
> >

>
>



 
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
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
limit on number of content placeholders(which are editable in content pages) in master page nemesis.saurabh@gmail.com ASP .Net 0 05-25-2006 04:44 AM
Error: "Content controls can only be used in a content page" J.Edwards ASP .Net 0 01-20-2006 11:43 AM
[XML Schema] Content type of complex type definition with complex content Stanimir Stamenkov XML 2 10-25-2005 10:16 AM
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">? TheKeith HTML 20 10-29-2003 11:56 AM



Advertisments