0
我正在使用引導程序和ASP.NET mvc創建Web應用程序。我在每個選項卡上使用視圖,但是現在所有數據都是一樣的。我想打電話給我的意見,並在標籤處於活動狀態時返回數據。我怎樣才能做到這一點? 所以我需要使用相同的參數加載diferents視圖。我怎麼能用js做到這一點!?這是標籤:使用mvc和JS在選項卡上加載多個視圖
<div class="board isactive">
<div class="board-inner">
<ul class="nav nav-tabs2" id="myTab">
<div class="liner"></div>
<li class="active">
<a href="#six" data-toggle="tab" title="Project Details">
<span class="round-tabs six">
<i class="glyphicon glyphicon-globe"></i>
</span>
</a>
</li>
<li>
<a href="#one" data-toggle="tab" title="Contract Details">
<span class="round-tabs one">
<i class="glyphicon glyphicon-list"></i>
</span>
</a>
</li>
<li>
<a href="#two" data-toggle="tab" title="Assignments">
<span class="round-tabs two">
<i class="glyphicon glyphicon-user"></i>
</span>
</a>
</li>
<li>
<a href="#three" data-toggle="tab" title="Purchase Orders">
<span class="round-tabs three">
<i class="fa fa-file-powerpoint-o"></i>
</span>
</a>
</li>
<li>
<a href="#four" data-toggle="tab" title="Invoices">
<span class="round-tabs four">
<i class="fa fa-file-text-o"></i>
</span>
</a>
</li>
</ul>
</div>
標籤,我需要點擊選項卡時加載頁面
</div>
<div class="tab-pane fade" id="one">
<h4>Contracts for @Model.Item1.Name</h4>
<p class="narrow text-center">
@Html.Action("index", "contracts", new { Model.Item1.ProjectID })
</p>
</div>
<div class="tab-pane fade" id="two">
<h4>Assignments for @Model.Item1.Name</h4>
<p class="narrow text-center" >
@Html.Action("index", "assignments", new { Model.Item2.ContractID })
</p>
</div>
<div class="tab-pane fade" id="three">
<h4>Purchase Orders for @Model.Item1.Name</h4>
<p class="narrow text-center">
@Html.Action("index", "purchaseorders", new { Model.Item2.ContractID })
</p>
</div>
<div class="tab-pane fade" id="four">
<h4>Invoices for @Model.Item1.Name</h4>
<p class="narrow text-center">
@Html.Action("index", "invoices", new { Model.Item2.ContractID })
</p>
</div>