I have set a session variable on a page after a database insert to prevent the user pressing refresh and adding another new record. How can I change the value of this session variable as the user leaves my page and goes to another page? I realise I can change the value of the session variable when a new page is opened but I am hoping not to have to put a bit of code to do this at the top of every page in the site.