protected void btnLogin_Click(object sender, EventArgs e) { if (txtEmail.Text.Trim().Length > 0 && txtPassword.Text.Trim().Length > 0) { UserLoginDetails userDetails = objBAL.CheckUser(txtEmail.Text, txtPassword.Text); if (userDetails != null) { if (!String.IsNullOrWhiteSpace(userDetails.UserID)) { lblMsg.Text = ""; Session["UserDetails"] = userDetails; Session["UserID"] = userDetails.UserID; Response.Redirect("Product_Order.aspx"); } else { lblMsg.Text = "Incorrect User Name/Password entered"; } } } }