Exemple #1
0
    protected void LoginButton_Click(object sender, EventArgs e)
    {
        string strUserame = UserName.Text;
        string strPassword = Password.Text;
        string strCaptcha = UserEntry.Text;

        DL_Employee objUser = new DL_Employee();
        if (strCaptcha.ToUpper() == CaptchaCodeValue.Text.ToUpper())
        {
            bool blnAccess = objUser.CheckUserAccess(strUserame, strPassword, strCaptcha);

            if (blnAccess)
            {
                Session["UserName"] = strUserame;
                Response.Redirect("../Index.aspx");
            }
            else
                LoginUserValidationSummary.HeaderText = "Invalid User credentials. Please try again.";

        }
        else
        {
            LoginUserValidationSummary.HeaderText = "Please enter the Captcha code correctly as displayed. Kindly try again.";
        }
        if (objUser != null)
            objUser = null;
    }
Exemple #2
0
    protected void LoginButton_Click(object sender, EventArgs e)
    {
        string strUserame = UserName.Text;
        string strPassword = Password.Text;
        string strCaptcha = UserEntry.Text;

        DL_Employee objUser = new DL_Employee();
        bool blnAccess = objUser.CheckUserAccess(strUserame, strPassword, strCaptcha);

        if (blnAccess)
        {
            Session["UserName"] = strUserame;
            Response.Redirect("../Index.aspx");
        }
        else
            LoginUserValidationSummary.HeaderText = "Invalid User credentials. Please try again.";

        if (objUser != null)
            objUser = null;
    }