关闭弹出窗口后如何刷新页面 [英] How to refresh a page when apopup is closed

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

问题描述

在我的应用程序中,当我单击按钮弹出窗口时,页面包含gridview和按钮,并且我想在关闭弹出窗口后刷新该页面.

In my application the page contains gridview and button when i click on button popup is coming and i want to refresh that page after the popup window is closed.

推荐答案

如有必要,再次调用同一页面并发送参数.
call the same page again with sending parameters if required..


在更新面板"中添加弹出代码,因此不会刷新背景页面.
并且只有当弹出窗口关闭时才会刷新.!!!
Add the Pop Up Code inside the Update Panel, so background page will not be refreshed.
and it will be refreshed only when the Pop up is closed.!!!


HI @Ramu
为此,您可以使用按钮单击的服务器端事件
这里最重要的一点是将targetcontrolid映射到标签,以便您可以使用
后面的代码隐藏弹出窗口 我正在为此编写示例代码
HI @Ramu
For this you can use the server side event of button click
here imortant point is map the targetcontrolid to label so that you can hide the pop up using the code behind
I am writing the sample code for this try this
protected void Button1_Click(object sender, EventArgs e)
{
Modelpopup.hide();
Response.redirect("Pagename.aspx");
}

此后,您的更改将被重新显示.
如果您使用的是更新面板,则将回发触发器设置为按钮,以使页面刷新,不要忘记设置更新面板的更新模式.

希望对您有帮助

谢谢

After this your changes are reflacted.
if you are using the update panel then set the postback trigger to the button so that your page is refresh don''t forget to set the update mode of your update panel.

Hope it will help you

Thanks


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

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