Here is my scenario:
I have the following menu created from a viewModel
<ul>
<li id="1" class="menu-item-click">Item 1</li>
<li id="2" class="menu-item-click">Item 2</li>
<li id="3" class="menu-item-click">Item 3</li>
</ul>
Each item in the list has the "capability" of knowing what partial view it should load (it is stored in the database this way)
I have the following code to capture the click event on each list item
$(".menu-item-click").click(function () {
//load the correct partial view
});
My question is were should i store the information on what partial view to load?
I could store it in the list item (li) as a custom attribute. (Doesn't seem like the best way)
I wish there was a way to send the list item's id to a type of "master" controller that could return the correct partial view.
Any help/direction would be greatly appreciated.
IEnumerable<string>?