PC Review


Reply
Thread Tools Rate Thread

ASPX page not always being "called"

 
 
epigram
Guest
Posts: n/a
 
      12th Aug 2005
This is probably a more general HTML question, but here it goes. We're
creating an asp.net app and noticed that sometimes if an aspx page has
already been visited (say, in a given session) that the page doesn't
actually get requested from the web server. In other words, we have
breakpoints on the page's constructor, init, pageload, etc. and they don't
get hit when this happens.

I turned off caching in IE ( by changing the Temporary Internet files
Settings via Tools | Internet Options) to see if it was the browser's fault,
and it appears it is. When I turned off caching the aspx page gets executed
on the server every time. So, I want to know how do you deal with this?
Can this be solved with a META tag or similar convention? There are certain
aspx pages we ALWAYS want to be requested so we can execute logic on the
server. So if the browsers, or IIS for that matter, caches the page we'll
be in trouble.

Any help would be much appreciated!

Thanks.


 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q2hhcmxlcw==?=
Guest
Posts: n/a
 
      12th Aug 2005
Hello,

Are you sure that you are not using "Page.IsPostBack" in the Page_Load?

This seems to work for me with not having pages cache:
Response.CacheControl = "No-cache"

I hope that this is helpful to you,
Charles


"epigram" wrote:

> This is probably a more general HTML question, but here it goes. We're
> creating an asp.net app and noticed that sometimes if an aspx page has
> already been visited (say, in a given session) that the page doesn't
> actually get requested from the web server. In other words, we have
> breakpoints on the page's constructor, init, pageload, etc. and they don't
> get hit when this happens.
>
> I turned off caching in IE ( by changing the Temporary Internet files
> Settings via Tools | Internet Options) to see if it was the browser's fault,
> and it appears it is. When I turned off caching the aspx page gets executed
> on the server every time. So, I want to know how do you deal with this?
> Can this be solved with a META tag or similar convention? There are certain
> aspx pages we ALWAYS want to be requested so we can execute logic on the
> server. So if the browsers, or IIS for that matter, caches the page we'll
> be in trouble.
>
> Any help would be much appreciated!
>
> Thanks.
>
>
>

 
Reply With Quote
 
Joerg Jooss
Guest
Posts: n/a
 
      17th Aug 2005
Charles wrote:

> Hello,
>
> Are you sure that you are not using "Page.IsPostBack" in the
> Page_Load?
>
> This seems to work for me with not having pages cache:
> Response.CacheControl = "No-cache"


That's a rather awful way to do it in ASP.NET. Use the HttpCachePolicy
class instead.

Response.Cache.SetCacheability(HttpCacheability.NoCache);

Cheers,
--
http://www.joergjooss.de
mailto:news-(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Using aspx page like this: <script src="ASPXPageHere.aspx"></scrip Mike Microsoft ASP .NET 2 28th Nov 2007 02:37 PM
what is 11" X 17" paper size called in excel page setup? =?Utf-8?B?SmVyZW15?= Microsoft Excel Misc 3 8th Oct 2005 05:57 PM
My Asp.net aspx page always reports HttpMethod is "GET" even it is "POST" from client, ? Jeff Microsoft ASP .NET 5 25th May 2005 08:41 PM
How do I use a file called "NotDefault.htm" as the Home Page for . =?Utf-8?B?UmljayBX?= Microsoft Frontpage 2 27th Jan 2005 10:49 AM
<forms name="CompanyWeb" loginUrl="login.aspx" protection="All" path="/" /> Murphy Microsoft ASP .NET 2 19th Apr 2004 08:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:07 PM.