为了保存记录,Im打开了Kendo UI窗口,其部分观点包括日本宇宙航空和宇宙航空研究开发机构:
@model MVC_ACME_Hardware.Models.BaseModel
<script type="text/javascript">
$(function () {
$("form").kendoValidator();
});
</script>
@using (Ajax.BeginForm("EditProduct", new AjaxOptions { UpdateTargetId = "ProductDiv", OnSuccess = "SomeMethod" }))
{
@Html.ValidationSummary(true)
<fieldset>
<legend>EmployeeFTE</legend>
@Html.HiddenFor(model => model.Products.Product_ID)
<div class="editor-label">
@Html.LabelFor(model => model.Products.Product_Name)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Products.Product_Name)
@Html.ValidationMessageFor(model => model.Products.Product_Name)
</div>
<input type="submit" value="Save" class="myButton" />
</fieldset>
}
When I run the form and click Save on the popup, the form posts successfully but the post is not done via AJAX and my SomeMethod onsuccess method is not being called. I ve tried adding...
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
......根据部分观点,但并不帮助。 我如何利用AJAX提交表格? 我没有一点明显的东西。 感谢!