Kendo UI for jQuery 使用window组件进行表单(form)的异步提交,
kendo在window组件中使用Ajax.BeginForm,进行表单的异步操作。
//from
@(Html.Kendo().Window()
//...
)
// to
@{
Html.Kendo().Window()
//...
.Render();
}
@{(Html.Kendo().Window().Name(
"Import"
)
.Title(
"Import"
)
.Visible(
false
)
.Modal(
true
)
.Content(
@<text>
@
using
(Html.BeginForm(
"Import"
,
null
,
null
, FormMethod.Post,
new
{ name =
"mainForm"
}))
{
@Html.TextArea(
"str"
)
@Html.ButtonLinkEx(
"Import"
,
"Import"
,
null
,
new
{ href =
"javascript:document.mainForm.submit();"
})
}
</text>
)
)
.Render();
}
参考
https://www.telerik.com/forums/ajax-beginform-in-window-not-working