Ajax.BeginForm in VS 2015 ASP.NET vNext missing?

I read about @ Html.BeginForm as well as @ Ajax.BeginForm in an earlier version of ASP.NET MVC for Razor Views. Then I opened VS 2015 to try both forms with ASP.NET vNext, but I can not find the Ajax object. Am I missing something? Do I need to include the optional Nuget package? Is there a new way to use Ajax.BeginForm? Isn't it added to VS 2015 (MVC 6) yet? Got off? Or what?

Note. I'm not interested in pure alternatives to HTML / JavaScript.

+4
source share
2 answers

jquery ajax unobtrusive is open source ( https://github.com/aspnet/jquery-ajax-unobtrusive ) and can be delivered via chat.

After importing, you can use data attributes with the same behavior as Ajax.BeginForm.

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

+3
source

MVC 6 uses tag helpers as an alternative to the HTML helper. This blog post by Dave Pattatt explains how to deal with form tags. In this post, chap created his own Ajax tag helper.

, @using System.Web.Mvc.Ajax _ViewImports.cshtml. jquery.unobtrusive-ajax.js jQuery, , . promises,

0

All Articles