Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQuery对话框在多次关闭/打开后显示白色内容_Jquery_Razor_Jquery Ui Dialog - Fatal编程技术网

jQuery对话框在多次关闭/打开后显示白色内容

jQuery对话框在多次关闭/打开后显示白色内容,jquery,razor,jquery-ui-dialog,Jquery,Razor,Jquery Ui Dialog,我有以下脚本:- //--show add server dialog $('body').on("click", "#addserver", function () { //Make it a dialog box. Note that you don't have to do this every time the button is called, so you might want to make it dialog on document ready or s

我有以下脚本:-

//--show add server dialog
    $('body').on("click", "#addserver", function () {

        //Make it a dialog box. Note that you don't have to do this every time the button is called, so you might want to make it dialog on document ready or something.

        $("#showserveroptions").dialog({
            title: "Add Exsisting Server",
            width: 600,
            height: 300
        });

        var ajaxCall = $.ajax({
            url: '@Url.Content("~/Rack/showServers")',
            data: {
                rackid: "@Model.Rack.TMSRackID",

            },
            type: 'get',
            success: function (html) {
                $('#showserveroptions').html(html);
                $("#showserveroptions").dialog("show"); //This could also be dialog("open") depending on the version of jquery ui.
            }
        });

     });
它在我的asp.net mvc中调用以下操作方法以打开对话框:-

[CheckUserPermissions(Action = "Edit", Model = "Server")]
        [OutputCache(CacheProfile = "NoCache")]
        public PartialViewResult showServers(int rackid)//to display a view insdie the dialog box , for assigning servers to a rack 
        {
            AddServerToRack s = new AddServerToRack { rackID = rackid };
            return PartialView("_showServers", s);



        }
目前,当第一次打开对话框时,该对话框可以正常工作,但在多次关闭/打开后,我将在一段时间内完成以下内容:-

有人能给我建议吗?
谢谢

检查
html
响应;查看是否为空否不为空,将进行调用,但不显示局部视图字段。我与firebug进行了检查,得到了200 ok作为响应消息。在使用部分视图呈现对话框之前,能否尝试清除对话框的html。i、 e.$('#showserveroptions').html(“”)@D#u Learning我尝试添加$('#showserveroptions').html(“”);但这并没有改变任何事情,问题仍然在发生。。。