protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["emp"] != null) { Employee emp = (Employee)Session["emp"]; //Dep Head gvRequisitionForm.DataSource = RequisitionControl.DisplayAllByDeptCode(emp.DeptCode); gvRequisitionForm.DataBind(); ViewState["DataSource"] = "displayAll"; showEmptyLabel(); //Dep Representative int count = RequisitionControl.CountPending(emp.DeptCode); lblPendingCount.Text = "Total Pendings: " + count.ToString(); } else { Utility.logout(); } } }