17 Ocak 2016 Pazar

Mapping AjaxOptions to attributes

Mapping AjaxOptions to attributes

The following table lists the mapping from AjaxOptions members to the HTML 5 data attributes:
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
In addition to these attributes, there will always be a data-ajax="true" attribute present to trigger the unobtrusive Ajax system.
* = data-ajax-mode will only be present if UpdateTargetId is set.
** = data-ajax-loading-duration will only be present if LoadingElementId is set.


<form action="/Controller/Action" data-ajax="true" data-ajax-failure="" data-ajax-mode="before" data-ajax-success="" data-ajax-update="#elementId" id="formId" method="post"></form>

<a  data-ajax="true" data-ajax-complete="" data-ajax-method="Post" data-ajax-mode="replace" data-ajax-update="#elementId" data-ajax-success="" data-ajax-failure=""> </a>

Hiç yorum yok:

Yorum Gönder

.net 6 mapget kullanımı

 app.UseEndpoints(endpoints => {     endpoints.MapGet("/", async context =>     {         var response = JsonConvert.Seriali...