015 - .Net Core: Simple AJAX Call From View To Controller

preview_player
Показать описание
This video presents information about simple AJAX call usage in ASP.NET CORE Web Application.
In summary,
-- people with cars will be prepared as model objects.
-- car objects will be displayed in a table in view.
-- buttons will be used to find owners of each car.
-- buttons will create AJAX requests
-- javascript function will be used to clear tables and refill owners without refreshing the view.

Highlighted Topics:
Usage of JsonResult
Usage of $.ajax
Buttons sending AJAX calls.
Refill html table with the AJAX responses by using JQuery.
Calling a view that its' name is different than action.

Model:
[DisplayFormat(DataFormatString = "{0:dd MMM yyyy}", ApplyFormatInEditMode = true)]

Important Lines From Controller:
public JsonResult GetCarOwners(int CarId)
return Json(carOwners);


Software:
OS: Windows 10
IDE: Visual Studio Community Edition
Browser: Firefox
.NET Core v2.2

Credits of the music:
Afternoon (Ambient Piano Solo) which is licensed under the Creative Commons 0 License.
Рекомендации по теме
Комментарии
Автор

thanks for the Video. Brilliant.
Can you please share the source code, that would be better for us to go through...

satishsathishsati
Автор

Hallo sir thanks for video tutorial. Can i get you word book module about ajax api?

hikmatperwiradjaya