object reference not set to an instance of an object.............
when this problem arise?
in general OOP, if you are trying to access properties or methods of class without creating or instantiating object of that class then runtime throws this error. See the below code which throws error : StringBuilder sbTest;
The red highlighted portion in above code throws the error as we haven't created the object of StringBuilder and we are trying to append string.
hey it's not only for session, if you are using viewstate and there is no value to bind and you use it , you will get this error. Also if you are using request.querystring("") and don't have correct key then also the same error throws.