|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Catch the page closing eventHi,
I have a web application using C#. In my application, I am creating a process. This process can be progresses several minutes. But I need that when user clicks close button(X), that process should be killed. So, I think that I have to catch the event when user clicks close button. How can I do? -- huseyin_akturk ------------------------------------------------------------------------ Posted via http://www.codecomments.com ------------------------------------------------------------------------ If the user closes their browser, only the browser knows about it. You are
asking about the page closing event, but that's not what's happening. It is the client-side onClose() event handler that you need to be writing code for. Show quoteHide quote "huseyin_akturk" <huseyin_akturk.1qj***@mail.codecomments.com> wrote in message news:huseyin_akturk.1qj75n@mail.codecomments.com... > > Hi, > I have a web application using C#. In my application, I am creating a > process. This process can be progresses several minutes. But I need > that when user clicks close button(X), that process should be killed. > So, I think that I have to catch the event when user clicks close > button. How can I do? > > > > -- > huseyin_akturk > ------------------------------------------------------------------------ > Posted via http://www.codecomments.com > ------------------------------------------------------------------------ >
Show quote
Hide quote
"Scott M." <s-mar@nospam.nospam> wrote in message If you are performing a process on the server and want to check to see if news:egxcWe5bFHA.796@TK2MSFTNGP09.phx.gbl... > If the user closes their browser, only the browser knows about it. You > are asking about the page closing event, but that's not what's happening. > It is the client-side onClose() event handler that you need to be writing > code for. > > > "huseyin_akturk" <huseyin_akturk.1qj***@mail.codecomments.com> wrote in > message news:huseyin_akturk.1qj75n@mail.codecomments.com... >> >> Hi, >> I have a web application using C#. In my application, I am creating a >> process. This process can be progresses several minutes. But I need >> that when user clicks close button(X), that process should be killed. >> So, I think that I have to catch the event when user clicks close >> button. How can I do? >> >> >> >> -- >> huseyin_akturk >> ------------------------------------------------------------------------ >> Posted via http://www.codecomments.com >> ------------------------------------------------------------------------ >> > > the client is still open you can use Response.IsClientConnected. HTH :) Mythran |
|||||||||||||||||||||||