// Populate the GridView with data private void BindGrid() { // Get CategoryID from the query string string categoryId = Request.QueryString["CategoryID"]; // Get a DataTable object containing the products grid.DataSource = CatalogBLO.GetAllProductsInCategory(categoryId); // Needed to bind the data bound controls to the data source grid.DataBind(); }