Close browser window

Discussion in 'ASP .Net' started by Vishal, Jan 10, 2005.

  1. Vishal

    Vishal Guest

    Hello,

    is it possible to execute something when the browser
    window is closed in asp.net?

    Thanks
     
    Vishal, Jan 10, 2005
    #1
    1. Advertising

  2. Not out of the box. I have heard there is some script you can place on the
    form that does something, but it didn't seem like a very clean approach, so
    I didn't keep the url.

    bill


    "Vishal" <> wrote in message
    news:123a01c4f72f$5532c250$...
    > Hello,
    >
    > is it possible to execute something when the browser
    > window is closed in asp.net?
    >
    > Thanks
     
    William F. Robertson, Jr., Jan 10, 2005
    #2
    1. Advertising

  3. Vishal

    Karl Seguin Guest

    You can use the PAge.RegisterStartupScript to hook into the onUnload event
    (http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onunload.a
    sp), popup a window and fire whatever you want to in the popup window, then
    close it...not the most elegant, but likely your only solution. There's
    likely a tutorial on it somewhere, google should help

    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "Vishal" <> wrote in message
    news:123a01c4f72f$5532c250$...
    > Hello,
    >
    > is it possible to execute something when the browser
    > window is closed in asp.net?
    >
    > Thanks
     
    Karl Seguin, Jan 10, 2005
    #3
  4. Vishal

    Saravana Guest

    One way to achieve is to open a new window with asp.net page in javascript
    unload event and run your asp.net code from that page and close that page
    also after your code execution.

    --
    -Saravana
    http://dotnetjunkies.com/WebLog/saravana/
    www.ExtremeExperts.com



    "Vishal" <> wrote in message
    news:123a01c4f72f$5532c250$...
    > Hello,
    >
    > is it possible to execute something when the browser
    > window is closed in asp.net?
    >
    > Thanks
     
    Saravana, Jan 10, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Denon
    Replies:
    1
    Views:
    598
    Saravana [MVP]
    Nov 14, 2003
  2. Replies:
    6
    Views:
    8,933
    sateeshranga
    Aug 7, 2008
  3. Iñaki Baz Castillo
    Replies:
    7
    Views:
    941
    Iñaki Baz Castillo
    Jan 12, 2010
  4. Shang Wenbin

    close current window using window.close()

    Shang Wenbin, Sep 1, 2005, in forum: Javascript
    Replies:
    10
    Views:
    423
    Gérard Talbot
    Sep 2, 2005
  5. Replies:
    0
    Views:
    546
Loading...

Share This Page