how can recognize in asp.net when user exit from a page ?
-
hi in one of my webform's project , user can select some choice from a list. after each select, that item insert into a temp table in my database. and ... at last ,if user click ok button ,all selected things insert into main table. if page closed or exit with any reason before user click ok or cancel button , in code temp table must be clear. my problem is can not find any thing such as an event for times when user exit from the page. how can recognize in asp.net when user exit from a page ? tanks
-
hi in one of my webform's project , user can select some choice from a list. after each select, that item insert into a temp table in my database. and ... at last ,if user click ok button ,all selected things insert into main table. if page closed or exit with any reason before user click ok or cancel button , in code temp table must be clear. my problem is can not find any thing such as an event for times when user exit from the page. how can recognize in asp.net when user exit from a page ? tanks
In ASP.NET, you can't, but you can write AJAX code that sends a message to the server when the browser is closed, and of course you can integrate this into your ASP.NET project, although it won't use any ASP.NET libraries or code behind ( unless you choose to emit your script in your code behind ).
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
hi in one of my webform's project , user can select some choice from a list. after each select, that item insert into a temp table in my database. and ... at last ,if user click ok button ,all selected things insert into main table. if page closed or exit with any reason before user click ok or cancel button , in code temp table must be clear. my problem is can not find any thing such as an event for times when user exit from the page. how can recognize in asp.net when user exit from a page ? tanks
-
In ASP.NET, you can't, but you can write AJAX code that sends a message to the server when the browser is closed, and of course you can integrate this into your ASP.NET project, although it won't use any ASP.NET libraries or code behind ( unless you choose to emit your script in your code behind ).
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )