@using (Ajax.BeginForm("ChangeCompanyId", "navigation", new { area = "configs" }, new AjaxOptions() { UpdateTargetId = "NavigationTree", OnSuccess = "InitTreeNode" }))
{
@Html.DropDownList("CompanyId")
}
<link href="@Url.Content("~/Content/themes/Common/css/jquery.treeview.css")" rel="stylesheet" />
<div style="display: none;">
@Html.CheckBox("IsBarringChildrens", (bool)ViewBag.IsBarringChildrens)
<span>不含子导航
</span>
</div>
<div id="NavigationTree">
@Html.Action("TreeNode", new { CompanyId = (int)ViewBag.CompanyIdValue })
</div>
要引用下面的。
<script src="@Url.Content("~/Scripts/Common/jquery/jquery.unobtrusive-ajax.min.js")"></script>
时间: 2024-10-06 00:31:04