473,378 Members | 1,099 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,378 software developers and data experts.

<% Response.CacheControl = "no-cache" %>

Hi,

Kind of spending too much time on the no-cache issue and found out something
like <% Response.CacheControl = "no-cache" %>.
In my ASP.Net, a C# .aspx file, where do I put the <% Response.CacheControl
= "no-cache" %>?
Is this enough to fix the Caching bug?
Thanks for help.

Jason


Nov 17 '05 #1
2 16651
Hi,

I think so, I have never do it that way, I use this line in the code behind:

Response.Cache.SetCacheability(HttpCacheability.No Cache);
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Jason Huang" <Ja************@hotmail.com> wrote in message
news:O7**************@TK2MSFTNGP14.phx.gbl...
Hi,

Kind of spending too much time on the no-cache issue and found out
something like <% Response.CacheControl = "no-cache" %>.
In my ASP.Net, a C# .aspx file, where do I put the <%
Response.CacheControl = "no-cache" %>?
Is this enough to fix the Caching bug?
Thanks for help.

Jason

Nov 17 '05 #2
Jason Huang wrote:
Hi,

Kind of spending too much time on the no-cache issue and found out
something like <% Response.CacheControl = "no-cache" %>. In my
ASP.Net, a C# .aspx file, where do I put the <%
Response.CacheControl = "no-cache" %>? Is this enough to fix the
Caching bug? Thanks for help.


Um... caching bug?

Anyway, either set the OutputCache directive on your page(s)

<%@ OutputCache Location="None" %>

or set the Cache property of the HttpResponse in your code-behind class:

Response.Cache.SetCacheability(HttpCacheability.No Cache);

(which is equivalent to the directive shown above)

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

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

Similar topics

19
by: Jane Austine | last post by:
As far as I know python's threading module models after Java's. However, I can't find something equivalent to Java's interrupt and isInterrupted methods, along with InterruptedException....
4
by: Skip Montanaro | last post by:
(moving over from webmaster mailbox) scott> I'm sorry for bothering you, but I've tried to post to the Python scott> Tutor Mail List, tried to get someone from Bay PIggies to scott> respond, but...
9
by: Daniel Schuchardt | last post by:
Hi @ all, I think thats a bug: SELECT '#' || '#' will work but SELECT '#' || CAST(NULL AS VARCHAR)
1
by: Anders Both | last post by:
Why does my asp.net application sometimes write into the debug window The thread '<No Name>' (0x974) has exited with code 0 (0x0). ?
1
by: Grey | last post by:
i use "this.Page.RegisterStartupScript()" to display the client-side script of confirmation box ...but I want to know that how can I know the user was clicked "YES" or "NO" as I need to do different...
1
by: Bob | last post by:
The thread '<No Name>' (0x29c) has exited with code 0 (0x0) What is this and why do I see it occasionally in the Output screen? Bob
4
by: Charlie Brown | last post by:
The thread '<No Name>' (0xedc) has exited with code 0 (0x0) While debugging appplications, I often see this message popup in the VS output window. Although I havent specifically written any...
3
by: Jason Huang | last post by:
Hi, In my C# Windows form project, I can receieve the mail from the C# code, however, it's EMPTY in the MAIL FROM: Would someone give me some advice? string Data; byte szData; TcpClient...
4
by: post | last post by:
I'm trying to figure out what is wrong with my PHP installation, I am running PHP 5 and Apache with mySQL. I have been trying to use <?=$filed('$username')?> within a input box: <td>Login:<?php...
3
by: my cats, Gag and yak | last post by:
the following keeps showing up in Application_Error I have re-installed VS2008 and it still happens I do not know what this means, thank you your help. {Name = "EventArgs" FullName =...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.