I am using C#
I am trying to check whether my login attempt is not more than 3, I mean with the below condition:
if (((int)Session["LoginAttempt"]) != 3)
{
}
In Login failed condition I am doing increment like below:
Session["LoginAttempt"] = ((int) Session["LoginAttempt"]) + 1;
But it is giving me this error: "Object reference not set to an instance of an object."
Suggestions please!