Click here to Skip to main content
15,916,091 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

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

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

    }
 
Share this answer
 
Comments
[no name] 13-May-13 3:12am    
It won't work in my application

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900