public void FillData() { Web webObj = new Web(); GridViewShoppingCart.DataSource = webObj.DisplayCartBooks(); GridViewShoppingCart.DataBind(); }
protected void GridViewShoppingCart_RowDeleting(object sender, GridViewDeleteEventArgs e) { string idValue = GridViewShoppingCart.DataKeys[e.RowIndex].Value.ToString(); int id = Convert.ToInt32(idValue); Web webObj = new Web(); webObj.Id = id; GridViewShoppingCart.DataSource = webObj.DeleteBook(); GridViewShoppingCart.DataBind(); }