Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Session clear and page refresh

Tags:

asp-classic

Using classic ASP I want to clear a form that auto populates with session variables upon loading.

I need to clear all of the session variables using a button.

I was using js to clear the text boxes but the session still exists.

I then tried a html reset button, but that didn't clear the session either.

So know I am trying to find a way to clear the ASP session variables using classic ASP.

Does anybody have any ideas?

like image 225
Primetime Avatar asked Nov 29 '22 03:11

Primetime


1 Answers

different ways depending on what you want to accomplish:

session("var") = "" will blank the value.

Session.Contents.Remove("var") will remove the variable

Session.Contents.RemoveAll() will remove all variables

or if you just want to start a new ASP session altogether you can do session.abandon

like image 146
Rodolfo Avatar answered Mar 13 '23 05:03

Rodolfo