Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create AJAX Form in Asp.Net Core

<form data-ajax="true" data-ajax-mode="replace" data-ajax-update="#results" asp-action="CreateCarClient" asp-controller="Account" method="post" enctype="multipart/form-data">

This form is not work

like image 667
FX_Sektor Avatar asked Nov 09 '18 16:11

FX_Sektor


1 Answers

You are using jQuery Unobtrusive AJAX in ASP.NET Core.You need to install the jquery.unobtrusive-ajax package into your project using npm install jquery.unobtrusive-ajax and add references to it in your view.

See tutorials of razor pages here.

This link displays my example of how to use the code step by step.

like image 101
Ryan Avatar answered Oct 02 '22 14:10

Ryan