protected void Button4_Click(object sender, EventArgs e) { EmployeeModel myEmployee = new EmployeeModel { firstName = TextBox1.Text, lastName = TextBox2.Text, emailId = TextBox3.Text, phoneNumber = Convert.ToInt64(TextBox4.Text), alternatePhoneNumber = Convert.ToInt64(TextBox5.Text), address1 = TextBox6.Text, address2 = TextBox7.Text, homeCountry = TextBox8.Text, currentCountry = TextBox9.Text, zipCode = Convert.ToInt32(TextBox10.Text), }; EmployeeDataAccessLayer myemployee = new EmployeeDataAccessLayer(); int result = myemployee.EditEmployeeDetail(myEmployee); if (result > 0) { string display = "Successful!"; ClientScript.RegisterStartupScript(this.GetType(), "Operation was", "alert('" + display + "');", true); } else { string display = "UnSuccessful!"; ClientScript.RegisterStartupScript(this.GetType(), "Operation was", "alert('" + display + "');", true); } }