0
喜是新來的MVC所以需要一些help.I想提出一個異步調用渲染的局部視圖但只要觀點被稱爲進入一個infinte循環。誰能幫忙?Ajax調用無限循環
<div class="headings">
<span><a href="#">
<img src="@Url.Content("~/Content/images/icons/Edit.png")" alt="Edit" /></a></span>
<p class="floatLeft">
@Model.Name</p>
</div>
<div class="profilesBlk" id="[email protected](Model.SectionId)"></div>
<script type="text/javascript" language="javascript">
$.ajax({
type: "POST",
url: '@Url.Action("FetchAllSubSections","Contacts")',
data:{sectionId:@(Model.SectionId)},
success: function (r) { $("#[email protected](Model.SectionId)").html(r); },
error: function (ret) {
}
});
</script>
而這正是這部分觀點被稱爲(這是另一個局部視圖)
<div>
@foreach (var section in Model.ContactDetailSections)
{
@Html.Partial("~/Views/Contacts/Details/SectionDetail.cshtml", section)
}
</div>
你想要什麼樣的基礎調用'$ .ajax'? – 2013-02-18 05:10:19