Help... options added to Select element from clientside automation not working properly with Code Be

Discussion in 'ASP .Net Web Controls' started by TCook, Aug 13, 2006.

  1. TCook

    TCook Guest

    Hey All,

    I am using the code below to dynamically add options to a select element on
    a web page
    For Each ThisItem In SomeItems
    lstDropDown = docDocument.getElementById("MySelect")
    optNewListItem = docDocument.createElement("option")
    optNewListItem.innerText = ThisItem .Name
    lstDropDown.appendChild(optNewListItem)
    Next

    When I try to access the options in the code behind class, it keeps telling
    me that the select control is empty even though the controls visibly show.
    This code is below:
    For Each ThisItem In Me.cboAttachments.Items
    If ThisItem.Selected = True Then
    'Do something here
    End If
    Next

    Why aren't they registering properly?

    Any thoughts?

    Any help greatly needed & appreciated.

    Best,

    TC
     
    TCook, Aug 13, 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. Dave Bartlett

    outputcache - clientside caching not working?

    Dave Bartlett, May 26, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    477
    Natty Gur
    May 26, 2004
  2. TCook
    Replies:
    0
    Views:
    332
    TCook
    Aug 13, 2006
  3. Mario Vargas
    Replies:
    4
    Views:
    1,214
    Mario Vargas
    Jun 22, 2007
  4. apondu
    Replies:
    0
    Views:
    618
    apondu
    Jul 19, 2007
  5. Francisco Padron

    Atlas not working properly after my control is added

    Francisco Padron, Jun 19, 2006, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    182
    Francisco Padron
    Jun 19, 2006
Loading...

Share This Page