View Single Post
  #5 (permalink)  
Old June 27th, 2009, 06:24 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 36,436, Level: 83
Points: 36,436, Level: 83 Points: 36,436, Level: 83 Points: 36,436, Level: 83
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,718
Thanks: 13
Thanked 306 Times in 302 Posts
Default

Hi keithroby,

Maybe I misunderstood your problem. I thought you were saving the selected items in a separate table; each with its own row. Since the datasource controls typically work with a single record, this won't work.

But you're right; if you want to store a string with the items, you can assign a value to one of the parameters of the data source control. However, you shouldn't do this in the Button's Click event, but in the data source's Inserting and Updating events. They fire right before the data is sent to the database and as such are a perfect place to modify parameters:

http://msdn.microsoft.com/en-us/libr...inserting.aspx
http://msdn.microsoft.com/en-us/libr....updating.aspx

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Everyone is unique, except for me.
Author of Beginning ASP.NET 4 : in C# and VB, Beginning ASP.NET 3.5 : in C# and VB and ASP.NET 2.0 Instant Results.

Did this post help you? Click the button to show your appreciation!
Reply With Quote