Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to stop a event from firing + ASP.NET
    text
    copied!<p>I have a WebPage on which I have to detect and prevent usage of Browser Refresh Button. (Now Please, dont suggest me Response.Redirect, I wont be able to use it in this scenario).</p> <p>On looking at this page <a href="http://aspalliance.com/687_Preventing_Duplicate_Record_Insertion_on_Page_Refresh.4" rel="nofollow noreferrer">http://aspalliance.com/687_Preventing_Duplicate_Record_Insertion_on_Page_Refresh.4</a> I found the way. I'm planning to put this idea in a Control and place the control on every page.</p> <p>Now that my page contains so many buttons and other controls. My concern is, If it is a refresh post... I dont want any events to get fired...</p> <p>It will be tedious to go and check whether it is a refresh post in the beginning of every event as my entire application is almost built.</p> <p>Any ideas that would help me.</p> <ul> <li>Raja</li> </ul> <p>Including the below text for sake of more clarity :</p> <p>Hi All, I hope a little misunderstanding... I dont want to stop user pressing the Refresh button... But all I want is to adjust my application's response accordingly... Imagine a scenario, when user clicks BUTTON-A a popup window opens with another page. Now when the user comes back and clicks refresh button in the main window, the click event of BUTTON-A is fired again and popup window is opened again... In such scenario, I want to refresh the page as such, without opening the popup window. so, I need to stop ASP.NET from firing the click event of BUTTON-A (or any other similar buttons) </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload