<SELECT id="leftBox" size="50">
</SELECT>
and I want to populate this with Options from the db:
<OPTION value="1234">John Smith</OPTION>
How can I do this?
NOTE: I need to be able to manipulate this box via a javascript I havethat works with standard HTML select controls. So I can't use anASP:ListBox.
Any suggestions?
Thanks.
asp:dropdownlist will render as a select ...
An ASP:ListBox gets rendered to the client as a <SELECT>... so you can use the javascript that you have with it.
Are you positive? This javascript I have I've been using for a longtime (pre-ASP.NET), and it works great. When I try to use it withASP:ListBox, I get javascript errors stating that "option" is not avalid something or other of that control.
You can use listbox if you have multiple items selected. If you are only going to have 1 item selected, opt for the dropdownlist.If you are still having problems, post some code so we can help you.
Nick
0 comments:
Post a Comment