【发布时间】:2013-09-26 07:12:31
【问题描述】:
我阅读了与同一问题相关的各种帖子,但似乎找不到解决方案。我有一个 MVC 4 应用程序,我在其中指定了一个表单
@using (Html.BeginForm("SaveFirstAmountPayable", "Policy", FormMethod.Post,
new Dictionary<string, object> { { "name", "frmPolicyFirstAmountPayable" },
{ "id", "frmPolicyFirstAmountPayable" } }))
{
@Html.Kendo().HtmlHelper.TextBoxFor(m =>
m.FirstAmountPayable.FirstAmountPayableDescription,
new Dictionary<string, object> { { "id", "txtDescription" }})
// Some other inputs bounded to the model.
}
我有一个按钮
<button class="btn grey" type="button" id="btnSave" name="btnSave">Save</button>
还有一些 JQuery 代码会做一些验证,然后提交表单
$(formId).submit();
我的控制器中有一个断点,并且模型中传递的所有值都是空的。任何想法为什么会发生这种情况?
【问题讨论】:
标签: c# asp.net-mvc-4 post