This is how I call the helper in my view right now (using Razor and C #):
@Html.ListBoxFor(m => m.Measures, new MultiSelectList(Model.Measures, "MsId"),
new Dictionary<string, object> { { "id", "measureId" } })
This works fine when setting the "id" in the form element, but when I try to do something like this:
@Html.ListBoxFor(m => m.Measures, new MultiSelectList(Model.Measures, "MsId"),
new Dictionary<string, object> { { "id", "measureId" }, { "name", "measureId" } })
Generated Source Code:
<select id="measureId" multiple="multiple" name="Measures">
Any help would be greatly appreciated.
source
share