private void GetTestsWithPara() { List <EntityTestPara> ldtDept = mobjDeptBLL.GetAllTestsWithPara(); if (ldtDept.Count > 0) { dgvTestParameter.DataSource = ldtDept; dgvTestParameter.DataBind(); Session["DepartmentDetail"] = ldtDept; int lintRowcount = ldtDept.Count; lblRowCount.Text = "<b>Total Records:</b> " + lintRowcount.ToString(); pnlShow.Style.Add(HtmlTextWriterStyle.Display, ""); hdnPanel.Value = ""; } else { pnlShow.Style.Add(HtmlTextWriterStyle.Display, "none"); hdnPanel.Value = "none"; } }