By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,274 Members | 1,024 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,274 IT Pros & Developers. It's quick & easy.

Stopping caching of aspx files on server (not page that gets sent to client)

P: 2
[This involves 2.0]


I am having a problem with caching, or at least I think it is with caching.

I have a simple <%= "text " + DateTime.Now.ToString() %> in one of my aspx files (that is included thru the <!-- #include file="..." --> tags ). So when I change "text" into something else and hit refresh, it still shows the word "text". The time actually changes with every hit of refresh.

I have caching (on client computer) turned of through the following method:

in my web.config:

<add name="NoCache"
enabled="true" />

... and at top of my aspx files, at the top:

<%@ OutputCache CacheProfile="NoCache" VaryByParam="none" %>

It seems as if the aspx file is cached in my server (localhost), but not the page that is sent to the client machine. How can I make it so that aspx file is not cached, or somehow tell .NET (or IIS) that the aspx file has been changed and needs to be reprocessed? (can "polltime" and "notification" be used in anyway? what about the whole thing with "cache dependency"?)

Apr 23 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.