how to make optgroup in asp.mvc?
MVC newbie here again!
I have two lists in my controller.
IList<Cars> allCars = _repository.GetAll<Cars>();
IList<Bikes> allBikes = _repository.GetAll<Bikes>();
Cars { Id, Name }
Bikes { Id, Name }
So, I have this list of class and I want to display a select dropdown list with an optgro开发者_高级运维up for bikes and cars, something like this: http://jsfiddle.net/xNEm9/
thanks!
I don't think you can without additional code but I think somebody worked on it before: Support for optgroup in dropdownlist .NET MVC?
精彩评论