Shouldn’t a controller in MVC be completely ignorant of how the data it gives to the view will be displayed?
My question relates to the SelectList. Should the controller be clever enough to know that the data will be presented in a drop down? Or should it simply give the view, through the view model, a list of items, and let the view handle it however it needs?
Absolutely – the controller is responsible for passing the correct data in the correct structure, but doesn’t give a monkeys about how it looks. The view could choose to display each list item in a random location if it wanted to – the controller shouldn’t be involved in visual logic. Otherwise, as you say, you lose the ‘separation of concerns’.