window Close event
-
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
-
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
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>