0
我有以下的局部视图:关闭jQueryUI的对话框
@using (Ajax.BeginForm("EditUserRole", "Administrator", null, new AjaxOptions{ OnSuccess = "CloseWnd()"))
{
<input type="submit" class="jqBtn" />
}
我阿贾克斯得到这个并将其插入到这样的对话:
@Ajax.ActionLink(" ", "GetEditUserRoleControl", new { userId = x.UserId }, new AjaxOptions { UpdateTargetId = "WndContent", OnSuccess="OpenWnd('Edit User Roles')" }, new { @class = "ui-icon ui-icon-person BtnIcon" })
<div id="WndContent" style="display: none;">
</div>
<script>
function OpenWnd(title) {
var $dialog = $("#WndContent").dialog({ title: title, modal: true });
//get the widget element
var $widg = $dialog.dialog('widget');
//find all buttons and apply button:
$("input:submit.jqBtn", $widg).button();
}
</script>
我在提交表单后需要关闭框。但似乎我会在取决于对话框的部分控件中编写代码。我也不想使用内置的jquery按钮,因为我必须从部分表单中删除按钮。任何帮助?