Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 18th, 2004, 01:10 PM
Authorized User
 
Join Date: Feb 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Shopping Baskets and Hashtables

The example in the book "Beginning ASP.NET 1.1" gives a shopping basket which uses a hashtable session variable. But it seems that the hashtable can only have 2 columns (key value pair). If I want to store multiple values for each row, what is the recommended data type ? I want to bind it to a listbox control, and store quantity, ID, description and price, and also show a running total of qty * price (perhaps in a separate control) at the bottom.

Any ideas much appreciated.

 
Old August 18th, 2004, 01:18 PM
Authorized User
 
Join Date: Mar 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can create a structure or object that will contain the information you wish to store and then pass this into the "value" property of the hashtable.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Hashtables Bill_Thompson C++ Programming 0 August 12th, 2008 05:29 AM
HashTables in VBA echovue Access VBA 3 May 31st, 2008 10:40 PM
Shopping cart help rsm42 ASP.NET 1.0 and 1.1 Basics 3 December 9th, 2006 06:09 AM
HashTables NitinJoshi General .NET 1 February 9th, 2005 03:53 PM
shopping cart isheikh BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 October 8th, 2004 04:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.