protected void GetAgencyReject() { Agentstbl agt = new Agentstbl(); List <Agentstbl> lstAgent = new List <Agentstbl>(); RegistrationBL objagBL = new RegistrationBL(); agt.IsActive = 0; agt.Status = 0; lstAgent = objagBL.GetRejAgents(agt).ToList(); if (lst.Count() >= 1) { gdvReject.DataSource = lstAgent; gdvReject.DataBind(); } else { DataTable dt = new DataTable(); gdvReject.DataSource = dt; gdvReject.DataBind(); } }