i trying to create a new Customer object and retrieve from it the Cid value like this:
Line 32: Customer temp = new Customer();
Line 33: temp =(Customer)Session["customer"];
Line 34: int id = temp.Cid;
but i get this error:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object."
I also was trying to do this:
int id = Convert.Toint(temp.Cid);
but it give me the same error