private void _BindService() { DatabaseConnectivity dbcon = new DatabaseConnectivity(); List <Product> service = dbcon.getProductList(); if (service.Count > 0 && service != null) { GridView1.DataSource = service; GridView1.DataBind(); } }