/* */ protected void btnLogin_Click(object sender, EventArgs e) { classes.Login clsLogin = new classes.Login(); if (clsLogin.DoLogin(txtUsername.Text, txtPassword.Text, true, false)) { pnlLoginMsg.Visible = false; pnlLogin.Visible = false; dlCommentList.Visible = true; pnlCommentBox.Visible = true; hndUserId.Value = Session["UserId"].ToString(); btnPostComment.Attributes.Add("OnClick", "if(CheckComment()==false){alert('Type in your answer first.');event.returnValue=false;return false;}else{return true;}"); //Get text for login links lnkSignIn.Text = Global.SetLnkSignIn(); lnkSignUp.Text = Global.SetLnkSignUp(); lblLogin.Text = string.Empty; } //login failed else { //TODO: display correct failure message lblMessage.Text = "Login Failed. Please try again."; } LoadAnswers(); }
/* */ protected void btnLogin_Click(object sender, EventArgs e) { classes.Login clsLogin = new classes.Login(); if (clsLogin.DoLogin(txtUsername.Text, txtPassword.Text, true, false)) { BindComments(); dlCommentList.Visible = true; pnlCommentBox.Visible = true; //Get text for login links lnkSignIn.Text = Global.SetLnkSignIn(); lnkSignUp.Text = Global.SetLnkSignUp(); lblWallMessage.Text = "Write a comment below"; btnNudge.Visible = true; btnNudge.Enabled = true; btnNudge.CssClass = "Tips btnNext"; } //login failed else { lblWallMessage.Text = "Wrong username or password. <a id='toggle2' class='orange_orange14u' href='#'>Login again.</a>"; lblWallMessage.ForeColor = Color.Red; //Response.Redirect(Request.Url.ToString(), false); } }
/* */ protected void btnLogin_Click(object sender, EventArgs e) { classes.Login clsLogin = new classes.Login(); if (clsLogin.DoLogin(txtUsername.Text, txtPassword.Text, true, false)) { BindComments(); dlCommentList.Visible = true; pnlCommentBox.Visible = true; //Get text for login links lnkSignIn.Text = Global.SetLnkSignIn(); lnkSignUp.Text = Global.SetLnkSignUp(); } //login failed else { //TODO: need error msg Response.Redirect(Request.Url.ToString(), false); } }