Content page unload event
===

I have a content page and on that there are two button - DoTransactionButton and CancelTranButton 
 I have a session state ["TransactionDone"] ( True of False).
I set ["TransactionDone"]= false on - Page not post back.
and I set this as True when DoTransaction button is clicked.  

Now i want to capture this information while leaving on the same page and call some function if DoTransaction is not clicked. 
Please let me know if i need to capture some event of content page where i can call this function.
Thanks in Advance.