One way to capture it is to maintain a session variable associated with the page in question. In the session variable, you must save some state of the enumeration, key or string, which would determine the last action taken. You can even use a simple counter with an addition, and if you have ever received a counter counter equal to a session variable, this indicates a page refresh, not a new action.
source share