I’m creating a shopping basket in ASP.NET using session variables to pass the data from a shopping.aspx page to basket.aspx, currently I have the pages passing the primary key of the product with a gridview on the basket.aspx used to display the data from the database.
However this only works for one item at a time, how can I extended the session variable so multiple products can be added, as well as quantities etc?
You can use your own object, eg. Basket which can have one or more properties.
Object should be market as Serializable.
For example: