0

Here's my existing code:

 <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
            DataSourceID="dsEmployees" DataTextField="Last_First" 
            DataValueField="EmpNum" 
            onselectedindexchanged="DropDownList1_SelectedIndexChanged">
 </asp:DropDownList>
p.campbell
  • 98,673
  • 67
  • 256
  • 322
Yves
  • 12,059
  • 15
  • 53
  • 57

2 Answers2

1

DropDownLists end up being rendered as <select> tags in HTML. These do not allow for data entry of new values. If you're looking for something similar to a ComboBox (a textbox and a listbox combined into the same control) then you'll need to find a third-party javascript implementation that is acceptable to you; there is no control which provides that functionality in HTML or the .net framework.

Ken Browning
  • 28,693
  • 6
  • 56
  • 68
  • Thank you Ken. I just thought there's a way to build a dynamic dropdown list with ASP. Thanks for the input. :) – Yves Jul 13 '09 at 20:17
0

Yonita, you need some more moving parts. You need a datasource to bind to, for instance.

Have a look at the Data Access tutorials on the ASP.NET website:

http://www.asp.net/learn/data-access/

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501