Unload 事件请参见
全部显示
当服务器控件从内存中卸载时发生。[Visual Basic]
Public Event Unload As EventHandler[C#]
public event EventHandler Unload;
[JScript] 在 JScript 中,可以处理由某个类定义的事件,但不能定义自己的事件。事件数据
事件处理程序接收一个 EventArgs 类型的参数。

解决方案 »

  1.   

    ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cpref/html/frlrfsystemwebuicontrolclassunloadtopic.htm
      

  2.   

    主页面打开一个新页面:
    win=window.showModalDialog(YouPage.aspx?Parameter='+OneParameter,window,'status=no;center=yes;help=no;dialogWidth=110px;dialogHeight=220px;scroll=no;resize=no');
    if(win=='t')
    {
    //do some thing
    }
    新页面关闭时:
    Response.Write("<script language=javascript>window.returnValue='t';</script>");
    Response.Write("<script language=javascript>window.close();</script>");这样你就能在新页面关闭时对主页面做一些事情了。
      

  3.   

    1。 Unload 事件有点问题
    2、谈开一个新窗口的花,如果客户端安装了3721等的花就彻底完了,
    谈不出窗口来
      

  4.   

    脚本能扑捉到,.net扑捉不到关闭事件
      

  5.   

    <body onbeforeunload="javascript:return confirm('是否退出?');">
      

  6.   

    <script>
    function window.onbeforeunload()
    {
    if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey)
    {
    window.event.returnValue="确定要退出本页吗?";
    }else
    {
    alert("你在刷新");
    }
    }
    </script>
    这样可以通过ie的差退出是可以,但是通过菜单不能捕捉