Exemplo n.º 1
0
 protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     mShoppingBag = (ShoppingBag)Session["mShoppingBag"];
     ProductInBag product = new ProductInBag();
     GridViewRow row = GridView2.Rows[e.RowIndex];
     product.ProdID = int.Parse(row.Cells[0].Text);
     mShoppingBag.DeleteProduct(product);
     Session["mShoppingBag"] = mShoppingBag;
     GridView2.EditIndex = -1;
     populate_GridView2();
 }