开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜