Listbox Control

Discussion in 'ASP .Net Web Controls' started by Brian Pittman, Oct 22, 2003.

  1. Hi,

    What would be the most efficient way to add items from a multi select
    listbox control into a SQL 2K table. For example I want new record added
    for each selected item in the listbox. I am able to do the task but in an
    inefficient way like the code below.

    For Each li In lstPDType.Items
    If li.Selected = True Then
    learning.Add(li.Value, objectID) 'This is a funtion that adds the
    item to a table everytime
    End If
    Next

    any help is appreciated

    Brian
    Brian Pittman, Oct 22, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. blenderdude
    Replies:
    0
    Views:
    978
    blenderdude
    Aug 3, 2003
  2. DC Gringo
    Replies:
    0
    Views:
    398
    DC Gringo
    Apr 6, 2004
  3. kent
    Replies:
    1
    Views:
    875
    Andrew de la Harpe
    May 3, 2004
  4. Simon Prince
    Replies:
    2
    Views:
    3,323
    =?Utf-8?B?TWljaGFlbCBUYXlsb3I=?=
    Oct 19, 2004
  5. Chris Kettenbach

    Listbox selection to populate another listbox?

    Chris Kettenbach, Jun 15, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,645
    Chris Kettenbach
    Jun 16, 2005
Loading...

Share This Page