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!
Sorry Guys,
I just changed the integer converting code from
to
and now it is working fine for me, please suggest incase of any issues in it.
Thanks!