protected void resetbtn_Click(object sender, EventArgs e) { if (emailtxt.Value != null) { string mail = emailtxt.Value; DataTable dt = new DataTable(); userloginDataOperation uldo = new userloginDataOperation(); dt = uldo.GetResetLink(mail); foreach (DataRow dr in dt.Rows) { if (Convert.ToBoolean(dr["ReturnCode"])) { SendPasswordResetEmail(dt.Rows[0]["Email_ID"].ToString(), emailtxt.Value, dt.Rows[0]["UniqueId"].ToString()); Label2.Text = "<b>An email with instructions to reset your password is sent to your registered Email-Id!</b>"; ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('An email with instructions to reset your password is sent to your registered Email-Id!')", true); } else { Label2.ForeColor = System.Drawing.Color.Red; Label2.Text = "Email Id not found!!!"; ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Email Id not found!!!')", true); } } } }
protected void resetbtn_Click(object sender, EventArgs e) { userloginDataOperation uldo = new userloginDataOperation(); string uid = Request.QueryString["uid"]; string pass = FormsAuthentication.HashPasswordForStoringInConfigFile(newpasstxt.Value, "MD5"); bool a = uldo.ChangeUserPassword(uid, pass); if (a == true) { Label2.Text = "Password Change Successfully!!"; ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Password Change Successfully!!')", true); } else { Label2.ForeColor = System.Drawing.Color.Red; Label2.Text = "Password Reset Link has expired or is invalid!!"; ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Password Reset Link has expired or is invalid!!')", true); } }
public userloginBLogic() { uldo = new userloginDataOperation(); }