Skip to content
This repository has been archived by the owner. It is now read-only.

AjaxHelper #2015

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

AjaxHelper #2015

ghost opened this issue Feb 13, 2015 · 14 comments

Comments

@ghost
Copy link

@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
Copy link
Member

@danroth27 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
Copy link

@rahuldhariya01 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
Copy link
Author

@ghost 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
Copy link

@rahuldhariya01 rahuldhariya01 commented May 30, 2015

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

@ghost
Copy link
Author

@ghost 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
Copy link
Member

@danroth27 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
Copy link
Member

@danroth27 danroth27 commented Jul 16, 2015

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

@afnpires
Copy link

@afnpires 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
Copy link

@EvAlex 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
Copy link

@ghost 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
Copy link

@aecuman aecuman commented Aug 8, 2016

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

@kshyju
Copy link

@kshyju kshyju commented Aug 28, 2016

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

@HallofFamer
Copy link

@HallofFamer 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
Copy link
Member

@Eilon Eilon commented Nov 15, 2016

Closing because we have no plans to support this.

@Eilon Eilon closed this Nov 15, 2016
@Eilon Eilon added the wontfix label Nov 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants