You can put it in the Page_Load event.
VB.NET :
Sub Page_Load(sender As Object, e As EventArgs)
Response.Cache.SetNoStore()
Response.Cache.SetCacheability(HttpCacheability.No Cache)
End Sub
C#
private void Page_Load(object sender, EventArgs e) {
Response.Cache.SetNoStore();
Response.Cache.SetCacheability(HttpCacheability.No Cache);
}
Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ :
http://asp.net.do/faq/
==========================
"Shawn" <bo********@hotmail.com> wrote in message
news:uH**************@TK2MSFTNGP09.phx.gbl...
I haven't tried anything yet. I've never worked with caching before. Where
would I put this code?
Shawn
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OO***************@TK2MSFTNGP10.phx.gbl... Have you tried using :
Cache.SetNoStore();
and
Cache.SetCacheability(HttpCacheability.NoCache);
?
Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================
"Shawn" <bo********@hotmail.com> wrote in message
news:uI**************@TK2MSFTNGP14.phx.gbl... > Hi.
>
> We have a web application that is used by several different companies. Each > company have access to a couple of hundred records which they are updating > daily. One of they companies have reported many problems since their IT
> department set up a proxy server. When they click a button to save data or > insert a new record all they get is a "Page cannot be displayed"-page. If > they press back in IE and try again, they might or might not be able to
> perform the desired action. In general they get the "Page cannot be
> displayed" 3 or 4 times when pressing back and trying again.
>
>
>
> I'm pretty sure that this has to do with the proxy caching web pages. Is > there something I can do so that this company's proxy server won't cache my > web pages?
>
>
>
> Thanks,
>
> Shawn
>
>
>
>