New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AjaxHelper #2015

Closed
ghost opened this Issue Feb 13, 2015 · 14 comments

Comments

Projects
None yet
9 participants
@ghost

ghost commented Feb 13, 2015

Hi,
I see that the AjaxHelper has been removed into project.
Has been replaced by another helper or will be developed later ?

@danroth27

This comment has been minimized.

Member

danroth27 commented Feb 16, 2015

We don't have any immediate plans to support AjaxHelper in MVC 6, but we are certainly interested in customer feedback on the importance of supporting this in MVC 6. Putting this on our backlog for now.

@rahuldhariya01

This comment has been minimized.

rahuldhariya01 commented May 29, 2015

Hi Danroh27, Don't understand why AJAX helper is not available ? this is very basic. do you have some alternative ? i am surprised by this ignorance of Microsoft team.

If this is not available then we have to go back to MVC 5.

Can you suggest any alternative way apart from J query ?

@ghost

This comment has been minimized.

ghost commented May 30, 2015

Hi rahuldhariya01,
Actually, i write the ajax tags data-ajax-* directly without helper, finally it is ease and is still readable. The autocompletion support would be useful in the source editor.

@rahuldhariya01

This comment has been minimized.

rahuldhariya01 commented May 30, 2015

Thanks Branciat. Even I tried the same but now success, failed ,onbegin,on completion event into this ?

@ghost

This comment has been minimized.

ghost commented May 30, 2015

An example of ajax action

<a href="@Url.RouteUrl("CoreApi", new { area = "Core", controller = "PostalAddress", action = actionName, id = Model })" class="hidden" data-ajax="true" data-ajax-mode="replace" data-ajax-failure="showError" data-ajax-update="#post_addr_form" id="pa_load_form"></a>

data-ajax="true" is required, data-ajax-mode can be to have a value as replace, before, after,...
You use javascript function without parameter for each data-ajax-(failure, success, begin),
it seems to me.
Of course, added the jquery-ajax-unobtrusive script into the layout.

See the brad wilson's blog http://bradwilson.typepad.com/blog/2010/10/mvc3-unobtrusive-ajax.html for a comparison AjxHelper and the html generated, also in complement the source code ajax unobtrusive.

@danroth27 danroth27 modified the milestones: 6.0.0-beta6, Backlog Jun 3, 2015

@danroth27

This comment has been minimized.

Member

danroth27 commented Jun 3, 2015

Pulling back into the release based on customer feedback.

@Eilon Eilon modified the milestones: 6.0.0-beta6, 6.0.0-beta7 Jun 29, 2015

@danroth27 danroth27 modified the milestones: Backlog, 6.0.0-beta7 Jul 16, 2015

@danroth27

This comment has been minimized.

Member

danroth27 commented Jul 16, 2015

We are not going to get to this in this release.

@afnpires

This comment has been minimized.

afnpires commented Jan 19, 2016

jQuery ajax unobtrusive is open source and can be bower pulled.

As @branciat mentioned the data attributes for the call can be used.

+------------------------+-----------------------------+
|      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               |
+------------------------+-----------------------------+
@EvAlex

This comment has been minimized.

EvAlex commented Feb 23, 2016

  1. Please, add pushState to it when porting to ASP.NET Core 1.0. This was really strange to miss this feature in unobtrusive ajax script. Good example on this is how Turbolinks work in Rails.
  2. Also, I personally find it important to name it differently. "Unobtrusive" is fair enough, but it is not related neither to AJAX, nor to partials, links, pushState and so on. Again, Turbolinks sets the benchmark here.
@ghost

This comment has been minimized.

ghost commented Jul 10, 2016

The future is not AjaxHelper is the main method, but if the existing MVC4 project ported to aspnetCore, this is very necessary

@aecuman

This comment has been minimized.

aecuman commented Aug 8, 2016

The Ajax Helper will endup being the stumbling block when porting to Aspnet5 ore like now 😨

@kshyju

This comment has been minimized.

kshyju commented Aug 28, 2016

@danroth27 Any update on this ? Is this something still in the backlog or completely dropped ?

@HallofFamer

This comment has been minimized.

HallofFamer commented Oct 24, 2016

I think its totally possible for you to create your own AJAX extensions even if it is missing from ASP.NET Core. It seems that someone already did that, so all you need is to add it to your project and maybe modify it slightly if some code aint working:
https://github.com/mono/aspnetwebstack/blob/master/src/System.Web.Mvc/Ajax/AjaxExtensions.cs

@Eilon

This comment has been minimized.

Member

Eilon commented Nov 15, 2016

Closing because we have no plans to support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment