Is there a way to keep the variable even after the page is closed? i tried by making it a static
variable but this doesn't work, I think I understand static wrong.
Yes , if the session cookies are not deleted or expired after the closing the page, please put the cookies life time for your required hours..