Kendo ui 如何获得剑道窗口';表单标签中的内容?

Kendo ui 如何获得剑道窗口';表单标签中的内容?,kendo-ui,kendo-asp.net-mvc,kendo-ui-mvc,kendo-window,kendo-ui-window,Kendo Ui,Kendo Asp.net Mvc,Kendo Ui Mvc,Kendo Window,Kendo Ui Window,我有下面的HTML地址显示使用剑道窗口 <form id="myform"> <input id="firstName" class="form-control" /> <input id="lastName" class="form-control" /> <button id="btnOpenWindow"

我有下面的HTML地址显示使用剑道窗口

<form id="myform">
    <input id="firstName" class="form-control" />
    <input id="lastName" class="form-control" />

    <button id="btnOpenWindow" type="button" class="btn btn-info">Click Me To Edit Address</button>
    @(Html.Kendo().Window()
        .Name("mywindow")
        .Title("My Window")
        .Width(400)
        .Visible(false)
        .Modal(true)
        .Content("<input id=\"address\" class=\"form-control\">")
        .Draggable(false))

    <button id="btnSubmit" type="submit" class="btn btn-info">Save</button>
</form>
<script src="~/js/test.js"></script>
问题
即使剑道窗口是在
表单
中定义的,它总是在
body
标记之前的页面末尾呈现,以及它的内容。因此
地址
不会在
表单中呈现。所以,当用户单击“保存”时,地址信息不会提交到服务器


如何在窗体内获取剑道窗口的内容渲染?

您可以尝试将地址字段定义为窗体内的隐藏项,然后在窗口关闭事件中更新这些值。我跳过了剑道窗口,使用了引导模式
$("#btnOpenWindow").click(function () {
         $("#mywindow").getKendoWindow().open().center();
        
});