Object reference not set to an instance of an object!!!
Posted: Wed May 19, 2010 4:45 pm
Hello
My problem, when i see my report result, i tried to save it in any format for example : xlsx, txt.....etc, i received this exception exactly on this line of code:
The exception is ("Object reference not set to an instance of an object").
The value of [perAdmin] session is assigned in the first page in my web project so no way to this session to be null, this is serious problem for me because i am in the final step in the project and i have to finish it.
Thank you.
My problem, when i see my report result, i tried to save it in any format for example : xlsx, txt.....etc, i received this exception exactly on this line of code:
Code: Select all
if (doctorID == "" && Session["perAdmin"].ToString() != "True") <<<------------------------ the exception come here
{
filterString += "AND StudentDoctorID = @DoctorID ";
}
The value of [perAdmin] session is assigned in the first page in my web project so no way to this session to be null, this is serious problem for me because i am in the final step in the project and i have to finish it.
Thank you.