protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ProductsBL productsBL = new ProductsBL(); List <Product> products = productsBL.GetProducts(); GridViewProducts.DataSource = products; GridViewProducts.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ProductsBL productsBL = new ProductsBL(); List <Product> products = productsBL.GetProducts(); GridViewProducts.DataSource = products; GridViewProducts.DataBind(); } }