开发者

Editing an asp.net DropdownList

开发者 https://www.devze.com 2023-03-07 16:39 出处:网络
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 e

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..

0

精彩评论

暂无评论...
验证码 换一张
取 消