Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Help... options added to Select element from clientside automation not working properly with Code Behind

Reply
Thread Tools

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

 
 
TCook
Guest
Posts: n/a
 
      08-13-2006
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Element 'ElephantTreeView' is not a known element. This can occur ifthere is a compilation error in the Web site, or the web.config file ismissing. Options Dave ASP .Net 0 07-05-2010 03:54 PM
Supressing the ctrl-c and other keys during word automation in automation apondu ASP .Net 0 07-19-2007 09:10 PM
Options added to select list with JavaScript lost on postback Mario Vargas ASP .Net 4 06-22-2007 01:21 PM
Help... options added to Select element from clientside automation not working properly with Code Behind TCook ASP .Net 0 08-13-2006 05:04 PM
Atlas not working properly after my control is added Francisco Padron ASP .Net Building Controls 0 06-19-2006 09:33 PM



Advertisments