protected void btnSubmit_Click(object sender, EventArgs e) { //create account for employee EmployeeInfo employee = new EmployeeInfo(); employee.UserName = tbxUsername.Text; employee.Name = tbxName.Text; employee.Password = tbxPassword.Text; employee.StoreId = DropDownListStoreLocation.SelectedItem.ToString(); if (!employee.CheckUserExit()) { employee.InsertEmployeeData(); Response.Write("<script> alert('Welcome to FloverTown')</script>"); //Response.AddHeader("refresh", "3;url=Login-admi.aspx"); Response.Redirect("Login-admi.aspx"); } else { lblWarming.Text = "The username already exit!"; lblWarming.ForeColor = System.Drawing.Color.Red; //Response.AddHeader("refresh", "3;url=Login.aspx"); } }//end employee account create