asp.net clear mode window Data caching operation method _ practical skills
Source: Internet
Author: User
Using the modal window ShowModalDialog () pop-up page is often used in asp.net
The most use is to click the "Modify" button, pop-up modify the page, after the successful modification, close the Modify page, refresh the parent page.
At present, a problem is, after refreshing the parent page, and then click the Modify button pop-up modify page, modify the page to display the data is not modified, or the first time to change the old data page, this involves the Clear mode window cache data problem.
This involves the ShowModalDialog caching mechanism, which requires us to manually add some code to clear the cache.
The
mode of operation is as follows :
First in the foreground interface (that is, the ASPX interface) code, add: <meta http-equiv= "Expires" content= "0"/><%--used to empty the cache, expires the value in the background page Page_ Assignment--%> in load function
Then in the background interface (that is, the CX interface), in the Page_Load function, if (! IsPostBack) {... Add code: Response.Expires = -1;//to empty cache
In this way, the cached data in the modal window can be erased, haha
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service