页面刷新后如何禁用弹出窗口 [英] how to disable popup after page refresh

查看:100
本文介绍了页面刷新后如何禁用弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,专家在这里
我使用registerstartupscript方法从代码后面显示了jQuery弹出窗口,但有时用户需要刷新页面(通过按浏览器刷新按钮或F5键),通常会再次显示弹出窗口.我如何避免这种情况,使弹出窗口永远不会显示页面刷新,当我需要显示后面代码的弹出窗口时...

hi experts here
I show jquery popup from code behind using registerstartupscript method.but sometimes user need to refresh the page(by pressing browser refresh button or F5) and normally what happens is the popup shown again.how can i avoid this that popup will never be shown on page refresh when i need to show popup from code behind...

推荐答案

仅当IsPostback == false时添加RegisterStartupScript;
Only add the RegisterStartupScript when the IsPostback == false;


这篇关于页面刷新后如何禁用弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆