在其服务器按钮上关闭“模态对话框"问题 [英] closing Modal Dialog Box problem on its server button

查看:109
本文介绍了在其服务器按钮上关闭“模态对话框"问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在使用模态对话框,在其中放置了一个提交按钮
完成该按钮上的操作后,我想关闭该模式窗口.

我尝试过搜索google.
但是我没有得到结果.

请帮帮我.

谢谢.

Hi,
I am using a Modal dialog Box in which I placed a submit button
After completing my on that button i want close that modal window.

I tried it with searching google.
But I didn''t get result.

Please help me.

Thank You.

推荐答案

根据您对话框中的google window.close()应该起作用.
According to google window.close() inside your dialog should work.


我假设要提交您正在使用ASP.NET按钮和Create_Alerts_Setting.aspx页中的完整回发.

在Create_Alerts_Setting.aspx页的"head"标记内,添加以下-
I am assuming for submit you are using a ASP.NET Button and a complete postback in Create_Alerts_Setting.aspx page.

In the Create_Alerts_Setting.aspx page, inside the "head" tag add the following -
<base target="_self" />



然后在提交按钮上回发



And on the submit button postback

Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
    // something on postback
    ClientScript.RegisterClientScriptBlock(this.GetType(), "closing", "window.close();", True)
End Sub


这篇关于在其服务器按钮上关闭“模态对话框"问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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