protected void btnYes_Click(object sender, EventArgs e) { try { int rowIndex = Convert.ToInt32(ViewState["financialyear_id"]); context.sp_DeleteFyear(companyId, branchId, rowIndex); divalert.Visible = true; lblAlert.Text = "Financial year Deleted Successfully "; loadDataTable(); } catch (Exception ex) { ErrorLog.saveerror(ex); //Do Logging } }