I need to be able to disable this ListBoxFor() depending on the Review status. Although the code below works it shows all list items.
@Html.ListBoxFor(m => m.ListOptions, filetypes, Model.IsUnderReview ? new { @class = "disabled" } : new { @class = "multiselectFileTypes" })
What would be the syntax to disable it but just so it shows '2 items selected'?
It seems the answer is to use the Html.helper command HiddenFor(), like this
By creating a hidden input for each SelectedRole item you then disable the whole list.