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

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -