protected void Resend_Click(object sender, EventArgs e) { bl.Cell_No = Session["Mobile_No"].ToString(); bl.Success = send_sms(Session["OTP"].ToString(), Session["Mobile_No"].ToString()); rb = dl.sms_log(bl); if (rb.status) { Utilities.MessageBoxShow("otp resend successfully"); } }
protected void forgot_Click(object sender, EventArgs e) { if (Page.IsValid) { try { if (Session["CheckRefresh"] != null) { if (Session["CheckRefresh"].ToString() == ViewState["CheckRefresh"].ToString()) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); bool cptch_expired = false; try { Captcha1.ValidateCaptcha(txt_captcha.Text.Trim()); } catch { cptch_expired = true; } txt_captcha.Text = ""; if (!cptch_expired) { if (Captcha1.UserValidated) { Captcha1.DataBind(); bl.Cell_No = txt_login.Text.Trim(); bl.Verified = "Y"; dt = dl.user_login_details_for_forgot_password(bl); if (dt.table.Rows.Count > 0) { Session["Mobile_No"] = bl.Cell_No; Session["Reset_Method"] = "Y"; Random randomclass = new Random(); Int32 rno1 = randomclass.Next(1000000, 9999999); string random = Convert.ToString(rno1); string rno = random.ToString(); bl.Success = send_sms(rno, bl.Cell_No); rb = dl.sms_log(bl); Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel2, "OTP has been sent to Your Mobile Number", "OtpVerification_Reg.aspx"); } else { Utilities.MessageBox_UpdatePanel(UpdatePanel2, "Please check your mobile number."); } } else { Utilities.MessageBox_UpdatePanel(UpdatePanel2, "Invalid Captcha!!! Please enter same characters as you see in image."); } } else { Utilities.MessageBox_UpdatePanel(UpdatePanel2, "Captcha Expired!!! Please re open this page in new window."); } } else { Utilities.MessageBox_UpdatePanel(UpdatePanel2, "Page Refresh or Back button is now allowed"); } } else { Utilities.MessageBox_UpdatePanel(UpdatePanel2, "Page expired!!! Please re open this page in new window."); } } catch (NullReferenceException) { Utilities.MessageBox_UpdatePanel_Redirect(UpdatePanel2, "Your Session Has Expired Please Login Again", "../Logout.aspx"); } } }