Page_Load Doesn't Execute

  • Thread starter Thread starter German Kruszewski
  • Start date Start date
G

German Kruszewski

Hi.
I have this problem: I have some code that loads an HTML
string into a public variable. That code is executed in
the Page_Load event. So the problem is that, when I
navigate the web, the page_load event sometimes get fired,
and sometimes not.
This is because the Explorer doesn't download the page
again form the Server, using the version that it haves in
the Cache.
I know that setting properly the IE, I can make it
download the page on every request, but what I want is
that the explorer refresh the view of the page without
doing so.
Can anybody help me? or in a better way... did anybody
understand what I asked for? :P

Thanks.
Germán.
 
Try some of these in your code behind.

Make sure to set these prior to sending anything else to the browser.
Headers must be sent first. I dont think asp.net handles it for you.

Response.Cache.SetExpires(DateTime.Now);
Response.CacheControl = "no-cache";
Response.Expires = -1;
Response.AddHeader("Pragma","no-cache");



Hi.
I have this problem: I have some code that loads an HTML
string into a public variable. That code is executed in
the Page_Load event. So the problem is that, when I
navigate the web, the page_load event sometimes get fired,
and sometimes not.
This is because the Explorer doesn't download the page
again form the Server, using the version that it haves in
the Cache.
I know that setting properly the IE, I can make it
download the page on every request, but what I want is
that the explorer refresh the view of the page without
doing so.
Can anybody help me? or in a better way... did anybody
understand what I asked for? :P

Thanks.
Germán.
 
Back
Top