Reputation: 657
I am using Bootstrap tabs in a page. And I need every tab to open up a new mvc view.
tab 1: Item Entry
tab 2: Item Type Entry
So, these two are the tabs and when the user clicks tab 1, it will open
Item/AddItem
"Item" is the Controller, "AddItem" is the Action Name
Item/AddType
They are different models. Don't know how to link the view page to the DIV element. Any Idea will be great !
Thanks.
Using : MVC5, Bootstrap 3
I am using Bootstrap nav tab from here :::
Upvotes: 0
Views: 183
Reputation: 3825
You can make AddItem and AddType actions child actions using Html.Action helper method and this child action methods render partial views for your tabs.
<div class="tab1">@Html.Action("AddItem","Item")</div>
<div class="tab2">@Html.Action("AddType","Item")</div>
Upvotes: 1