protected void BtnConfirmMoible_Click(object sender, EventArgs e) { string name = Request.Cookies["RePwdName"].Value.ToString(); try { MemberInfoDAL obj = new MemberInfoDAL(); string phone = obj.GetMobileByName(Request.Cookies["RePwdName"].Value.ToString()); if (phone == this.TxtMobile.Text.Trim().ToString()) { string ProofPwd = obj.RndNum(6); //发送验证码 Tz888.BLL.SendNotice mob = new Tz888.BLL.SendNotice(); if (mob.SendMobileMsg(this.TxtMobile.Text.Trim().ToString(), ProofPwd)) { Session["Proofpwd"] = ProofPwd; Response.Redirect("succeedByMobile.aspx"); } else { Response.Write("<script>alert('服务器发送验证码失败,请重试!');</script>"); } } else { this.LblMessage.Text = "您输入的手机号码不是注册时的手机号!"; } } catch { Response.Write("<script>alert('发送验证码失败,请重试!');</script>"); } }
protected void BtnConfirmMoible_Click(object sender, EventArgs e) { MemberInfoDAL obj = new MemberInfoDAL(); try { string phone = obj.GetMobileByName(Request.Cookies["RePwdName"].Value.ToString()); if (phone.Length == 11 && phone.IndexOf("-", 0) == -1) { if (phone == this.TxtMobile.Text.Trim().ToString()) { string ProofPwd = obj.RndNum(6); //发送验证码 Tz888.BLL.SendNotice mob = new Tz888.BLL.SendNotice(); if (mob.SendMobileMsg(this.TxtMobile.Text.Trim().ToString(), ProofPwd)) { Session["Proofpwd"] = ProofPwd; Response.Redirect("succeedByMobile.aspx"); } else { Response.Write("<script>alert('服务器发送验证码失败,请重试!');</script>"); } } else { Response.Redirect("RetrieveStep9.aspx"); } } else { Response.Redirect("Errortelephone.aspx"); } } catch { Response.Write("<script>alert('发送验证码失败,请重试!');</script>"); } }