Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have crested a page in MVC. It is displaying some event details. In the first time it is displaying details of 10 events correctly. Then I put a Next button to display the next 10 events. It is fetching the next 10 event details correctly and also binding the details in the aspx page.
But when the display comes it is showing the old 10 event details.The html tab in firebug is also displaying the new events.

What should I do to solve this problem?
Posted
Updated 15-Nov-10 0:10am
v3

1 solution

You might want to turn off caching:
Disable client caching: <META HTTP-EQUIV ="Expire" CONTENT ="0">

Another very simple method is to add a variable with a different value in the url each time to ensure that the page is reloaded. Something like: www.test.com?val=h7j39kl

Good luck!
 
Share this answer
 
Comments
deepak thomas 15-Nov-10 6:21am    
where should i write this code?
deepak thomas 15-Nov-10 6:44am    
i have written this in head tag of master page, still not displaying the new events.
E.F. Nijboer 15-Nov-10 8:40am    
This should become part of the HTML, like:
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="expires" content="0">
...

But have a look at this link that will give you more detailed information:
http://www.codeproject.com/KB/aspnet/NoCaching.aspx
deepak thomas 16-Nov-10 3:53am    
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900