protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { UserGeneralInfo UGI = new UserGeneralInfo(); string pass = Login1.Password; if (!UGI.Query_UserName(Login1.UserName)) { if (UGI.Query_Password(Login1.UserName) == pass) { Session["UserName"] = Login1.UserName; UGI.update_Login(Login1.UserName, 1); Response.Redirect("fooHome.aspx"); this.Visible = false; } } Login1.FailureText = "User Name or Password Mismatched"; }
protected void LoginButton_Click(object sender, EventArgs e) { UserGeneralInfo UGI=new UserGeneralInfo(); string pass = Login1.Password; if (!UGI.Query_UserName(Login1.UserName)) { if (UGI.Query_Password(Login1.UserName) == pass) { Session["UserName"] = Login1.UserName; UGI.update_Login(Login1.UserName, 1); Response.Redirect("fooHome.aspx"); this.Visible = false; } } Login1.FailureText = "User Name or Password Mismatched"; }
protected void Button2_Click(object sender, EventArgs e) { bool attempt = false; UserGeneralInfo UGI = new UserGeneralInfo(); if (UGI.Query_UserName(txtUserName.Text)) { if (UGI.Query_email(txtEmail.Text)) { if (UGI.User_Registration(txtFName.Text + " " + txtLName.Text, txtUserName.Text, txtDob.Text, ddSex.Text, txtEmail.Text, txtPass.Text)) { attempt = true; } } else { lblError.Text = "Email already Exist"; } } else { lblError.Text = "UserName not available"; } if (attempt) { MailAndSms ms = new MailAndSms("20"); ms.SendEmail("*****@*****.**", txtEmail.Text, "Email Varification", "please follow the Link http://cmrsocial.moooo.com:81/Authenticate.aspx?uid=" + txtUserName.Text); Session["UserName"] = txtUserName.Text; //********CREATING FOLDERS FOR THE REGISTERD USERS*********// String folder1 = "~/foopicDB/" + Session["UserName"].ToString(); Directory.CreateDirectory(Server.MapPath(folder1)); String folder2 = "~/foopicDB/" + Session["UserName"].ToString() + "/Profile"; Directory.CreateDirectory(Server.MapPath(folder2)); UGI.update_Login(Session["UserName"].ToString(), 1); Response.Redirect("fooHome.aspx"); } clear_function(); }
protected void Button2_Click(object sender, EventArgs e) { bool attempt=false; UserGeneralInfo UGI = new UserGeneralInfo(); if (UGI.Query_UserName(txtUserName.Text)) { if (UGI.Query_email(txtEmail.Text)) { if (UGI.User_Registration(txtFName.Text+" "+txtLName.Text, txtUserName.Text, txtDob.Text, ddSex.Text, txtEmail.Text, txtPass.Text)) attempt = true; } else lblError.Text = "Email already Exist"; } else lblError.Text = "UserName not available"; if (attempt) { MailAndSms ms = new MailAndSms("20"); ms.SendEmail("*****@*****.**", txtEmail.Text, "Email Varification", "please follow the Link http://cmrsocial.moooo.com:81/Authenticate.aspx?uid=" + txtUserName.Text); Session["UserName"] = txtUserName.Text; //********CREATING FOLDERS FOR THE REGISTERD USERS*********// String folder1 = "~/foopicDB/" + Session["UserName"].ToString(); Directory.CreateDirectory(Server.MapPath(folder1)); String folder2 = "~/foopicDB/" + Session["UserName"].ToString() + "/Profile"; Directory.CreateDirectory(Server.MapPath(folder2)); UGI.update_Login(Session["UserName"].ToString(), 1); Response.Redirect("fooHome.aspx"); } clear_function(); }
private void populate_year() { UserGeneralInfo UGI = new UserGeneralInfo(); txtDob.Text=UGI.Query_dob(Session["UserName"].ToString()); }
private void populate_year() { UserGeneralInfo UGI = new UserGeneralInfo(); txtDob.Text = UGI.Query_dob(Session["UserName"].ToString()); }