【发布时间】:2013-12-20 22:39:00
【问题描述】:
我是剑道新手,我很难做到这一点。我跟着这个演示。 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>
控制器: public ActionResult TheAction(string id, FormCollection form) { …… }
那么 Kendo 是如何在 modal 中将数据传递给控制器的呢?
【问题讨论】:
标签: asp.net-mvc kendo-ui asp.net-ajax