Example #1
0
    protected void btnLogIn_Click(object sender, EventArgs e)
    {
        RegisterUser objUser  = new RegisterUser();
        string       Email    = txtmail.Text.Trim();
        string       Password = txtpassword.Text.Trim();
        DataTable    dt       = objUser.GetLoggedInUserDetails(Email, Password);

        if (dt.Rows.Count > 0)
        {
            Session["sesnuserid"]   = dt.Rows[0]["UserID"].ToString();
            Session["sesnusername"] = dt.Rows[0]["UserName"].ToString();
            Session["sesnemail"]    = dt.Rows[0]["Email"].ToString();
            Response.Redirect("UIDesignTest.aspx");
        }
        else
        {
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "ErrorMessage", "LoginErrorNotification();", true);
        }
    }