如何在asp.net Web表单中的关闭事件上进行编码 [英] how to code on close event in asp.net web forms

查看:51
本文介绍了如何在asp.net Web表单中的关闭事件上进行编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web表单,并且在关闭我的Web表单时有一个临时表,我想删除我的临时表数据.如何在close事件或何处编码.请给我代码或提供参考.在此先感谢

I have a web form and i have a temporary table when closing my web form I want to delete my temporary table data.How to code on close event or where.Please give me code or give refrences.Thanks in advance

推荐答案

检查ig global.asax是否在您的项目中.
添加global.asax文件.
现在将您的代码放在

check ig global.asax is in your project if not.
add global.asax file.
and now put yor code in

void Application_End(object sender, EventArgs e)
    {
        //  Code that runs on application shutdown
        System.Windows.Forms.MessageBox.Show("Application closed");

    }


这篇关于如何在asp.net Web表单中的关闭事件上进行编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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