protected void Button1_Click(object sender, EventArgs e) { if (Page.IsValid) { String password = Encrypt(TextBox_password.Text); int j = Data_Access.Register_employee(TextBox_emp_id.Text, TextBox_name.Text, password, DropDownList_post.SelectedValue, TextBox_email.Text, DropDownList_branch.SelectedValue, TextBox_mobile.Text); if (j == 1) { Response.Write("Successful"); } else if (j == 2) { Response.Write("Employee ID already registered"); } } }