I am using a HTML.ListBox within a view as such:
<%= Html.ListBox("projects", Model.Projects) %>
This is populated with an IEnumerable<SelectListItem> in the model as such:
Projects = project.Select(a => new System.Web.Mvc.SelectListItem
{
Value = "foo",
Text = a.project + "(" + a.count + ")",
Selected = false
});
return Projects;
Which in turn is returned to the controller for passing into a strongly typed view.
My question is, how can I monitor for select item events? I need to be able to perform some action when the user makes a selection and/or de-selection.
Thanks.