MVC -DropDownList - Categories - SubCategories
Posted
by Frajer
on Stack Overflow
See other posts from Stack Overflow
or by Frajer
Published on 2009-06-09T16:11:50Z
Indexed on
2010/06/02
16:04 UTC
Read the original article
Hit count: 108
asp.net-mvc
In my database I have tbales: categoreis and SubCategoreis. I would Like to create one Dropdownlist containg both of these. Something like:
«Välj»
<option value='1000' style='background-color:#dcdcc3;font-weight:bold;' id='cat1000' >
-- FORDON -- /// this is from Categoreis Table
</option>
<option value='1020' id='cat1020' >
Bilar /// this is from SubCategoreis
</option>
<option value='1040' id='cat1040' >
Bildelar & Biltillbehör /// this is from Categoreis
</option>
<option value='1060' id='cat1060' >
Båtar /// this is from Categoreis
</option>
<option value='1080' id='cat1080' >
Båtdelar & tillbehör /// this is from Categoreis
</option>
Any samples how I could solve this? should I use Helpers or MVCUsercontrol??? I think that caching is importatnt in this case.Help me out ! Thanks!!
© Stack Overflow or respective owner