Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. window Close event

window Close event

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netdebugging
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sulabh2020
    wrote on last edited by
    #1

    Hi All, Here i m stucked with a problem and devoted my best half the day to solve the same but cant get any sucess. my problem is, i want to trace the browser close button event and perform some operation on the same. I have tried all the things like window.close(), onunload event but cant able to find the correct sollution. i dont want my function to call at page refresh, i wants to call the same only when user clicks to X button of browser. Please help

    Hello Forum Always be in touch to help about the topic ASP.NET

    I 1 Reply Last reply
    0
    • S sulabh2020

      Hi All, Here i m stucked with a problem and devoted my best half the day to solve the same but cant get any sucess. my problem is, i want to trace the browser close button event and perform some operation on the same. I have tried all the things like window.close(), onunload event but cant able to find the correct sollution. i dont want my function to call at page refresh, i wants to call the same only when user clicks to X button of browser. Please help

      Hello Forum Always be in touch to help about the topic ASP.NET

      I Offline
      I Offline
      Imran Khan Pathan
      wrote on last edited by
      #2

      You can Icallback and execute your code in code behind side before closing window.check return argument and you can close window. The other way is create one method in code behind side and call this method using javascript and close window for example In html source page [Close](javascript:CloseWIN();) In code behind side function void CallMethod() { //code here } javascript function CloseWIN() { <% CallMethod() %> window.close(); } please don't forget to vote on the post that helped you.</x-turndown>

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups