标签:complete control blog target action 计划 color upd tpm
Asp.net core中已经取消了Ajax.BeginForm,也不会计划出ajax tag helper,所以得利用插件jquery-ajax-unobtrusive,在form中加入相关data-*属性
https://github.com/aspnet/Mvc/issues/2015
http://bradwilson.typepad.com/blog/2010/10/mvc3-unobtrusive-ajax.html
+------------------------+-----------------------------+
| AjaxOptions | HTML attribute |
+------------------------+-----------------------------+
| Confirm | data-ajax-confirm |
| HttpMethod | data-ajax-method |
| InsertionMode | data-ajax-mode |
| LoadingElementDuration | data-ajax-loading-duration |
| LoadingElementId | data-ajax-loading |
| OnBegin | data-ajax-begin |
| OnComplete | data-ajax-complete |
| OnFailure | data-ajax-failure |
| OnSuccess | data-ajax-success |
| UpdateTargetId | data-ajax-update |
| Url | data-ajax-url |
+------------------------+-----------------------------+
<form asp-controller="ControllerName" asp-action="ActionName" data-ajax="true" data-ajax-mode="replace" data-ajax-loading="search-info-ajax" data-ajax-update="#info-list" data-ajax-success="testajaxsuccess" data-ajax-method="get"> </form>
<div id="info-list" class="col-md-12">
</div>
标签:complete control blog target action 计划 color upd tpm
原文地址:http://www.cnblogs.com/hahaxi/p/6780746.html