Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Force aspx page to load from server--not cache

Reply
Thread Tools

Force aspx page to load from server--not cache

 
 
William LaMartin
Guest
Posts: n/a
 
      06-21-2008
I have an aspx page, A.aspx, that uses some xml. The source of the xml is
another aspx page, B.aspx. B.aspx is populated with xml by code that
depends on several Session variables.

This all works fine the first time you load A.aspx. however, on subsequent
times--with changed session variables--A.aspx is the same, as is B.aspx, if
you check it. However, B.aspx is not really the same, since if you refresh
the browser, B.aspx will then display the new xml as it should for the new
session variables.

How can I force the B.aspx page to not be produced from cache when it is
requested by A.aspx? There is no HTML on it so I cannot use something like
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">.


 
Reply With Quote
 
 
 
 
William LaMartin
Guest
Posts: n/a
 
      06-21-2008
I found the solution: Put the following vb code in the load event for the
aspx page in question (B.aspx)

Response.Cache.SetCacheability(HttpCacheability.No Cache


"William LaMartin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have an aspx page, A.aspx, that uses some xml. The source of the xml is
>another aspx page, B.aspx. B.aspx is populated with xml by code that
>depends on several Session variables.
>
> This all works fine the first time you load A.aspx. however, on
> subsequent times--with changed session variables--A.aspx is the same, as
> is B.aspx, if you check it. However, B.aspx is not really the same, since
> if you refresh the browser, B.aspx will then display the new xml as it
> should for the new session variables.
>
> How can I force the B.aspx page to not be produced from cache when it is
> requested by A.aspx? There is no HTML on it so I cannot use something
> like <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">.
>



 
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
Nike air force one, air force 1, air force one low cut, air force one abdul_razak@indiatimes.com Digital Photography 2 12-31-2008 04:29 PM
Nike Air Force Ones,Air Force One Air Force One-1 lky52193@gmail.com Computer Support 0 01-17-2008 04:40 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:46 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:34 PM
no-cache to force reload new page tshad ASP .Net 0 07-27-2006 10:47 PM



Advertisments