It depends on what you need to accomplish.
Typically you have a table where you store a record for each item that is selected in the listbox. In the long run, this makes it easier to maintain and query your data. Storing it as single value makes it really difficult to query that data and treat it as relational.
If you also need to be able to edit the list again, you can take two approaches:
1. First, delete all items from the table. Then loop through the listbox and insert only the selected items.
2. Loop through the listbox and delete the items that are not selected from the database table and insert the items that are selected.
The second case is useful if you need to store more data about the item than its value alone (for example, the date/time it was inserted).
Hope this helps,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
Beginning ASP.NET 3.5 : in C# and VB,
ASP.NET 2.0 Instant Results and
Dreamweaver MX 2004
Want to be my colleague? Then check out this post.