protected void btnUpdate_Click(object sender, EventArgs e) { try { objAdmin.SNO = Convert.ToInt32(ViewState["SNO"]); objAdmin.TotalCylinders = Convert.ToInt32(txtTotalCylinders1.Text); objAdmin.AvailableCylinders = Convert.ToInt32(txtAvailableCylinders1.Text); string s = objAdmin.UpdateCylinders(); lblMsg1.Text = s; btnShow_Click(sender, e); } catch (Exception ex) { } }