Kendo UI for jQuery 使用window組件進行表單(form)的異步提交

 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"nullnull, FormMethod.Post, new { name = "mainForm" }))

            {

                @Html.TextArea("str")

                @Html.ButtonLinkEx("Import""Import"nullnew { href = "javascript:document.mainForm.submit();" })

            }

        </text>

    )

).Render();

}

參考

https://www.telerik.com/forums/ajax-beginform-in-window-not-working

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章