如何关闭ASP.Net中的应用程序? [英] How to close application in ASP.Net?

查看:149
本文介绍了如何关闭ASP.Net中的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我将此代码写在仅在InternetExplorer中工作的应用程序itz中的代码中.它在其他浏览器中不工作.如何在所有浏览器中关闭应用程序.

Hi,
I wrote this below code in my application itz working in InternetExplorer only.Itz not working in other browsers.How to close application in all browsers.

protected void btnclose_Click(object sender, EventArgs e)
    {
        Response.Write("<script language='javascript'> { window.close();}</script>");
    }

推荐答案

<asp:button id="a" runat="server" text="sss" onclientclick="window.close()" xmlns:asp="#unknown" />



请尝试使用此链接

> http://stackoverflow.com/questions/375406/programmatically-close-aspx- page-from-code-behind [ ^ ]


检测通过单击[X]按钮关闭的浏览器 [
Hi
pls try with this link

http://stackoverflow.com/questions/375406/programmatically-close-aspx-page-from-code-behind[^]


Detect browser closing through clicks on the [X] button[^]

thnx


这篇关于如何关闭ASP.Net中的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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