protected void btn_submit_Click(object sender, EventArgs e) { if (Session["CheckRefresh"].ToString() == ViewState["CheckRefresh"].ToString()) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); if (Page.IsValid) { Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim()); if (Captcha1.UserValidated) { if (btn_submit.Text == "Submit") { bl.UserID = txt_Userid.Text; rd = dl.CheckUserID(bl); if (rd.table.Rows.Count == 0) { HttpBrowserCapabilities browse = Request.Browser; bl.RegistrationID = dl.Get_unique_Registration_code(); bl.Password = ul.GenerateMd5Hash(txt_password.Text); bl.NameHindi = ""; bl.NameEnglish = txt_first_name.Text; bl.Gender = ddl_gender.SelectedValue; bl.MobileNo = txt_mobile.Text; bl.EmailID = txt_email.Text; bl.Address = txt_Address.Text; if (ddl_country.SelectedValue == "091") { bl.Country_name = txtState_Other.Text; bl.Country = ddl_country.SelectedValue; bl.Statecode = ddl_state.SelectedValue; bl.DistrictCode = ddl_district.SelectedValue; bl.DistrictName = txt_Districtname.Text; } else { bl.Country_name = txtState_Other.Text; bl.Statecode = ""; bl.Country = ddl_country.SelectedValue; bl.DistrictCode = ""; } bl.PinCode = txt_pincode.Text; bl.IsValid = "N"; bl.UserType = ddl_usertype.SelectedValue; bl.Registration_Year = DateTime.Now.Year.ToString(); bl.UserIP = ul.GetClientIpAddress(this.Page); bl.UserAgent = Request.UserAgent.ToString(); bl.UserOS = Utilities.System_Info(this.Page); bl.User_browser = browse.Browser; rb = dl.Insert_user_Registration(bl); if (rb.status == true) { Session["username"] = bl.UserID; Session["REGID"] = bl.RegistrationID; // Response.Redirect("User_Mobile_Varification.aspx?mobile=" + bl.MobileNo + "&RegistrationID=" + bl.RegistrationID + ""); Utilities.MessageBox_UpdatePanel_Redirect(udp_farm, "You Are Registered In Our Server You Need To Varify Your Mobile To activate Yor Login ID, We Are Redirecting To Our Varification Page", "user/User_Mobile_Varification.aspx"); } else { Utilities.MessageBoxShow("registration Unsuccessful"); } } else { Utilities.MessageBoxShow("User ID Not Available Please Choose Another UserID"); } } } else { Utilities.MessageBox_UpdatePanel(udp_farm, "Invalid Captcha"); } } } }