views:

1972

answers:

1

I have an asp.net website that is using update panels on the page that i cant get to reload from the server. I have this for the disable page cache on the master page.

    'Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1))
    'Response.Cache.SetValidUntilExpires(False)
    'Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches)
    'Response.Cache.SetCacheability(HttpCacheability.NoCache)
    'Response.Cache.SetNoStore()

When I click the browser back button to go back to the page it says the page has expired. the other pages on my web site work and call the page load, the only solution i found but cant use is to wrp the whole page in an update panel, but i cant do this becuase i have a report viewer on the page that does not work with ajax. If anyone can help i would deeply appriciate it.

A: 

Just add this in your view file in header part:

<head>
<script language="JavaScript">
<!--
javascript:window.history.forward(1);
//-->
</script>
</head>

Inside body tag add this:

<body onUnload="OperaReload()">
<input type="hidden" id="refreshed" value="no">
Arjun Urs