避免showModalDialog打开的窗口Page_Load只执行一次

当showModalDialog打开的窗口Page_Load只执行一次,导致

if (!IsPostBack){}

中代码没有执行,查了相关资料,原因在于第一次之后加载都是从缓存中直接获取之前的页面,故需清除缓存,

在<head></head>中加入

<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>

posted @ 2010-09-15 09:44  唐瑭  阅读(467)  评论(0编辑  收藏  举报