c# - ERR_CACHE_MISS when navigating back to an ASPX page -


i have webforms application first page grid containing links second page loads pdf viewer. grid located in .ascx control. working going first page pdf viewer page. however, when hit button return first page. following error (in chrome, happening in other browsers):

cache miss error

if click button browser returns first page , fine, need resolve error.

i have tried disabling cache in first page based on recommendation this stackoverflow answer, so:

response.appendheader("cache-control", "no-cache, no-store, must-revalidate"); // http 1.1. response.appendheader("pragma", "no-cache"); // http 1.0. response.appendheader("expires", "0"); // proxies. 

i have tried this:

response.cache.setcacheability(httpcacheability.nocache); response.cache.setnostore(); response.cache.setexpires(datetime.minvalue); 

i've placed code in code behind of .aspx page , in .ascx control (in oninit methods), no avail. missing here?

as @jjs implied sounds using onclick (possible via linkbutton or imagebutton) causing partial/full postback , redirect occurring in code-behind. if correct, there reason why not using hyperlinks?

cache handling not fix. browser stating post occurred between pages.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -