protected void ButtonSubmit_Click(object sender, EventArgs e) { WattsALoanServiceReference.Employee employee = new WattsALoanServiceReference.Employee(); employee.EmployeeID = int.Parse(TbxEmployeeID.Text); employee.EmployeeNumber = TbxEmployeeNumber.Text; employee.FirstName = TbxFirstName.Text; employee.LastName = TbxLastName.Text; employee.Titles = TbxTitles.Text; employee.HourlySalary = float.Parse(TbxHourlySalary.Text); WattsALoanServiceReference.WattsALoanServiceClient client = new WattsALoanServiceReference.WattsALoanServiceClient(); bool result = client.UpdateEmployee(employee); client.Close(); string script = @"alert(""Edit employee " + TbxEmployeeNumber.Text; if (result) { script += @" success."");"; } else { script += @" failed."");"; } ScriptManager.RegisterStartupScript(this, GetType(), "ServerControlScript", script, true); }