Javascript 如何设置剑道窗口的内容?

Javascript 如何设置剑道窗口的内容?,javascript,jquery,asp.net-mvc,kendo-ui,kendo-window,Javascript,Jquery,Asp.net Mvc,Kendo Ui,Kendo Window,我有一扇窗户: @(Html.Kendo().Window() .Name("errorWindow") .Title("") .Content(@<text> //Put text here </text>) .Draggable() //Enable dragging of the window .Resizable() //Enable resizing of the window .Modal(tr

我有一扇窗户:

   @(Html.Kendo().Window()
  .Name("errorWindow") 
  .Title("")
  .Content(@<text>
            //Put text here
     </text>)
  .Draggable() //Enable dragging of the window
  .Resizable() //Enable resizing of the window
  .Modal(true)

  .Visible(false)
  )

我可以用这个JScript调用它:

function onAjaxFailure(data) {
        var window = $("#errorWindow").data("kendoWindow");
        window.center().open();
    }
但是我如何将文本放入窗口?换句话说,“数据”参数将是错误窗口中显示的文本。

使用,例如:

()


如果希望它显示在窗口内的某个元素中,可以在
kendoWindow.element

中搜索它。我对此解决方案有一些问题。我正在将一个带有其他剑道小部件的PartialView加载到窗口中,我发现JavaScript错误,小部件没有正确显示。
function onAjaxFailure(data) {
        var window = $("#errorWindow").data("kendoWindow");
        window.center().open();
    }
$("#dialog").kendoWindow({
    modal: true,
    visible: false,
});

setTimeout(function () {
    var kendoWindow = $("#dialog").data("kendoWindow");
    kendoWindow.content("show this");
    kendoWindow.center().open();
}, 2000);