你的位置:首页 > ASP.net教程

[ASP.net教程]MVC Form异步请求


 @using (Ajax.BeginForm("CreateReviewInfo", "Review", new AjaxOptions          {            HttpMethod = "post",            OnSuccess = "BackResultReview",            OnBegin = "ShowLoading",            OnComplete = "HideLoading"          }, new { @id = "ReviewInfoForm", @role = "form", @class = "form-horizontal" }))          {
@Html.AntiForgeryToken()
<button type="submit" >添&nbsp;&nbsp;加</button> }

在mvc-bootstrap中使用时@Scripts.Render("~/bundles/jqueryval")加上验证的js