c# - How to insert an "All" option in dropdownlist? -
how write code "all" list item in drop down list such when "all" selected, entire list of items in drop down list selected?
note: "all" list item in same drop downlist rest of items (which databounded) should selected when user selects "all".
my current code:
if (modeldropdownlist.selectedvalue == "all") { foreach (listitem modelno in modeldropdownlist.items) { modelno.selected = true; } }
you need write seperate method called when "all" selected manually makes selection of items.
this should http://www.codeproject.com/articles/18063/multi-select-dropdown-list-in-asp-net
Comments
Post a Comment