嗨,我正在尝试显示选项卡并尝试获取选项卡的数据,使用下面的代码我设法显示选项卡,但我的控制器中没有调用 GetManufacturerProductsForCountry 操作。如果我的代码已磨损,请纠正我。
" %><%@ Import Namespace="EmsAdmin.Models" %>
<% foreach (var country in ((Country[])ViewData["countries"]))
{ %>
<li><a href="#">
<%: country.Name %></a> </li>
<% } %>
</ul>
<div class="panes">
<% foreach (var country in ((Country[])ViewData["countries"]))
{ %>
<div class="pane">
<div style="clear: both;">
</div>
</div>
<div id="ProductCountry<%:country.Id %>">
<script type="text/javascript">
var taskInput = "";
$.ajax({
url: "/Manufacturers/GetManufacturerProductsForCountry/"+<%:Model.Id %>+<%:country.Id %>,
type: 'get',
success: function (data) {
taskInput = data;
$("#ProductCountry").html(data);
}
});
</script>
</div>
<% } %>
</div>