protected void btnSignup_Click(object sender, EventArgs e) { duplicate = data.CheckDuplicate(txtUserName.Text); if (txtUserName.Text != "" && txtPassword.Text != "" && txtFullName.Text != "" && txtEmail.Text != "") { if (duplicate == 0) { member = new Member(txtUserName.Text, txtPassword.Text, txtFullName.Text, txtEmail.Text); data.createMember(member); Session["User"] = txtUserName.Text; userType = "m"; // is a member Session["UserType"] = userType; Response.Redirect("ProfilePage.aspx"); } else { lblError.Text = "The username already existed."; lblError.Visible = true; } } else { lblError.Text = "Please Enter all the fields"; lblError.Visible = true; } }