I am trying to add a serialized selectable from Jquery Ui to a view in MVC. Specifically, I would like a supervisor to be able to select individual or multiple employees from a list of his/her subordinates. This list of employees would be built in the controller and assigned to a ViewBag. I would like the selectable to be populated with employees from this ViewBag.
What is the best way of going about this? I’m also not married to the idea of using a ViewBag to accomplish this.
the viewbag, or model, is the mechanism to pass data from the controller to the view. the view will render the html. in this can an ordered list. then you would have a script tag with the appropriate jquery code. so it will look something like this
controller
view
jquery