when i set a session variable is set and used in one page and when i go to next page and use that session i am able to use it.
But when i go back to previous page by clicking on back button of browser.
And now if i use that session varible again it get set to null and if i try to use it, i get "Object reference not set to an instance of an object."
I am thinking of using Application_Error event of Global.asax file
Here can i check if error is of type "Object reference not set to an instance of an object."
and if error is of that type i will check all session variables if any of it is null and if yes i will redirect it to login page