Selected property of list box items is not working for me. What am I missing?

Discussion in 'ASP .Net' started by tom c, Sep 26, 2006.

  1. tom c

    tom c Guest

    In ASP.Net 1.1, the selected property of the list box is not working
    for me. In the code below, I loop through all the items in a listbox.
    I can see the text and value from the list box just as I extected, but
    Item.selected is never true, even though I have selected muliple items.
    Any idea what I might be missing?

    Dim Item As ListItem
    For Each Item In listA.Items
    x = Item.Text
    y = Item.Value
    z = Item.Selected
    If Item.Selected = True Then
    x = Item.Text
    y = Item.Value
    End If
    Next
    tom c, Sep 26, 2006
    #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. =?Utf-8?B?Sm9obg==?=

    list box selected items

    =?Utf-8?B?Sm9obg==?=, Mar 9, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    1,286
    =?Utf-8?B?Sm9obg==?=
    Mar 9, 2006
  2. =?Utf-8?B?cGVsZWdrMQ==?=

    asp.net 2 list box and get selected items

    =?Utf-8?B?cGVsZWdrMQ==?=, Sep 1, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    1,094
    Nathan Sokalski
    Sep 2, 2007
  3. =?Utf-8?B?SmFtZXMgUGFnZQ==?=

    Check Box List Selected Items

    =?Utf-8?B?SmFtZXMgUGFnZQ==?=, Oct 29, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    2,281
    =?Utf-8?B?SmFtZXMgUGFnZQ==?=
    Oct 30, 2007
  4. Anjan Bhowmik
    Replies:
    1
    Views:
    457
    Misbah Arefin
    Feb 14, 2008
  5. mldardy
    Replies:
    1
    Views:
    743
    mldardy
    Dec 10, 2008
Loading...

Share This Page