I have a dropdown list of 5 elements. My problem 开发者_C百科is that I want to make this dropdown list editable. Basically a user might want to delete one of these elements or might want to add more elements. Whats a good approach of doing that in asp.net ?
Use a ComboBox.
You have to put textbox for typing text and button for user to insert into the list and button for delete Do you know the code to adding and deleting list in the dropdown list right ?
Use a ListBox - that way they can make a multi-selection of their choice:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listbox.aspx
The DropDownList is not intended for multi-selection. Another option would be to use CheckBoxes.
If you use DataBase, u can make dropdownlist MORE editable with elements like "formView", "gridView" and so on..
精彩评论