Hello Friends,
In MVC 5 application I need to implement dropdown list with multiple selection including select all option. Can any one help me !!!
Thanks
DropDownList with multiple select checkbox
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Nilesh AvhadRank #3,587 · 406 reputationPosted May 29, 2014, 11:47 PM EDT
public static string CheckBoxList(this HtmlHelper helper, string name, IEnumerableSelectListItem> items) { var output = new StringBuilder(); output.Append(@""); foreach (var item in items) { output.Append(@"); output.Append(name); output.Append("\" value=\""); output.Append(item.Value); output.Append("\""); if (item.Selected) output.Append(@" checked=""chekced"""); output.Append(" />"); output.Append(item.Text); output.Append(" "); } output.Append(" "); return output.ToString(); }