How to create a 'fresh' session when the page is re-opened

134 views Asked by At

I am very new to basic programming, and I'm currently creating a webpage that handles bookings and when the booking has been made, it stores the $ value of the booking and the amount of the booking in session variables. How do I make it so that when the page has been exited and then re-opened the values get re-set? I have a clear button that does this manually but is it possible to do it automatically?

Cheers

1

There are 1 answers

18
Grant Thomas On BEST ANSWER

You can use Session.Abandon() when you're done.

Once the Abandon method is called, the current session is no longer valid and a new session can be started. Abandon causes the End event to be raised. A new Start event will be raised on the next request.