protected void btnUpdate_Click(object sender, EventArgs e) { Countrytbl ls = new Countrytbl(); ls.CountryID = Convert.ToInt32(hdnCountryID.Value); ls.CountryName = txtCountry.Text; List <Countrytbl> lst = new List <Countrytbl>(); ls.IsActive = 1; ls.UpdatedBy = 1; ls.UpdatedDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); lst = objCountryBL.UpdateCountry(ls).ToList(); ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "alertMessage('Country Updated Successfully');", true); Clear(); btnUpdate.Visible = false; btnSave.Visible = true; GetCountry(); }