我是剑道新手,我很难做到这一点 . 我按照这个演示 . here并让它处理我希望在窗口模式中有一个文本框和一个发送按钮的部分,用户必须填写并单击发送 .
我可以使用Ajax来调用我的控制器,但是我无法通过FormCollection将模态窗口中的信息传递给控制器 . 这是我的窗口模态模板:
<script type="text/x-kendo-template" id="template">
<div id="details-container">
<h5 data-idtest="1">#= Id #</h5>
<h2>#= TitleDisplay # - #= ArtistDisplay #</h2>
Input The Day:<input id="TheDayTextBox" name="TheDay" type="text" />
@using (Ajax.BeginForm("TheAction", "Search", new AjaxOptions { UpdateTargetId = "#=Id" }))
{
<button class="btn btn-inversea" title="Log outa" type="submit">Log Offsdfsaf</button>
}
</div>
Controller:public ActionResult TheAction(string id,FormCollection form)
那么Kendo如何将数据传递给模态中的控制器呢?
1 回答
尝试将您的输入放在实际表单中: