Close browser window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vishal

    Close browser window

    Hello,

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

    Thanks
  • William F. Robertson, Jr.

    #2
    Re: Close browser window

    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" <anonymous@disc ussions.microso ft.com> wrote in message
    news:123a01c4f7 2f$5532c250$a50 1280a@phx.gbl.. .[color=blue]
    > Hello,
    >
    > is it possible to execute something when the browser
    > window is closed in asp.net?
    >
    > Thanks[/color]


    Comment

    • Karl Seguin

      #3
      Re: Close browser window

      You can use the PAge.RegisterSt artupScript to hook into the onUnload event
      (http://msdn.microsoft.com/workshop/a...nts/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
      Programming blog exploring Zig, Elixir, Go, Testing, Design and Performance



      "Vishal" <anonymous@disc ussions.microso ft.com> wrote in message
      news:123a01c4f7 2f$5532c250$a50 1280a@phx.gbl.. .[color=blue]
      > Hello,
      >
      > is it possible to execute something when the browser
      > window is closed in asp.net?
      >
      > Thanks[/color]


      Comment

      • Saravana

        #4
        Re: Close browser window

        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





        "Vishal" <anonymous@disc ussions.microso ft.com> wrote in message
        news:123a01c4f7 2f$5532c250$a50 1280a@phx.gbl.. .[color=blue]
        > Hello,
        >
        > is it possible to execute something when the browser
        > window is closed in asp.net?
        >
        > Thanks[/color]


        Comment

        Working...