Refresh dialogue window data

xiaoxiao2021-03-06  44

Question: I use the showmodaldialog () pop-up window. Change the data of the page. After shutting down, this window will pop up. However, the data will not change. That is to say, he did not reload this window again. Function. Help! Thank you. Solution: 1.

Write on Page_Load in your pop-up window

This.page.response.expires = 0;

2.

Join in the HTML area of ​​the pop-up page

3.

Put this sentence in Page Load!

Context.response.cache.setcacheability.nocache;

4.

In order to prevent caching, you can add response.expires = -1 at the top of the page.

Using Java, you can <% response.sethead ("Pragma", "NO-Cache") in JSP or Servlet;

Response.setheader ("Cache-Control", "No-cache"); Response.SetDateHeader ("Expires", 0);

%> Using HTML tags, as follows:

5.

SHOWMODALDIALOG ('YourPage.aspx? id = <% # databinder.eval (container.DataItem, "ID")%>' '& temp =' math.random (), Window, 'Status: false; Dialogwidth: 600px; Dialogheight: 400px ')

转载请注明原文地址:https://www.9cbs.com/read-70882.html

New Post(0)