Friday 9 August 2013

Check Login with Session is Null or Empty

try this function to check login status with User Email Id : 

public static bool CheckLogin()
        {
            if (!string.IsNullOrEmpty(Convert.ToString(HttpContext.Current.Session["Email"])))
            {
                return true;
            }
            else
            {
                return false;
            }
        }

No comments:

Post a Comment