473,396 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ASPX page not always being "called"

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.
Nov 19 '05 #1
2 1021
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.

Nov 19 '05 #2
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.No Cache);

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Harish | last post by:
Hi, Why is "jdbc:oracle:thin" called a thin driver? Thanks in advance. Harish.
2
by: Olivier aka Cypher | last post by:
Hi gurus and fellows. I designed an pilot applet with can be seen at http://push.integration.euronext.com/Applet/index_raw2.htm This applet has no GUI in fact. It receive financial data (which...
4
by: mike | last post by:
regards: <a href="JavaScript:loadwindow(106,90);" style="font-family:Verdana;">元智Intranet</a> In HTML spec,are "href" and "style" called "attribute"?....@@ Could someone good give me the...
2
by: wen | last post by:
and, in which case, the following case will happen: if __name__!='__main__': do_sth() any help would be appreciated.
5
by: G. Stewart | last post by:
The word "Business" in the term implies some sort of commercial aspects or connotations. But from what I can see, that is not necesserially the case at all? So what is the reasoning behind the...
0
by: Edward | last post by:
Hi All, Does anyone know if framework 2, or VS 2005 has a default cssclass called "Report" ? If I use the "Report" keyword for a cssclass on a gridview control it inherits font size and...
7
by: torus | last post by:
Is the aspnet account called "aspnet" for all non-English versions of Windows and IIS?
3
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - Why do some posts have <FAQENTRYin them ? -----------------------------------------------------------------------...
1
by: Garfield | last post by:
I use Sax2 in xerces-c 2.7. I know when is called "validateElement" method. I know simply that is called before "startElement" until now. but I was wrong!!!! there is not always called...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.