Cov txheej txheem:

Vim li cas Ajax siv hauv MVC?
Vim li cas Ajax siv hauv MVC?

Video: Vim li cas Ajax siv hauv MVC?

Video: Vim li cas Ajax siv hauv MVC?
Video: CIAJ LUAG NYAB-2 (BY)Maiv Thoj 2024, Kaum ib hlis
Anonim

ASP. NET AJAX enables ib daim ntawv thov Web kom khaws cov ntaub ntawv los ntawm lub server asynchronously thiab hloov kho cov feem ntawm nplooj ntawv uas twb muaj lawm. Yog li cov no, cov nplooj ntawv tshiab ib nrab ua rau daim ntawv thov web teb ntau dua thiab yog li txhim kho cov neeg siv kev paub. nyob ntawm qhov txuas peb tau nyem.

Yog li ntawd, kev siv Ajax hauv MVC yog dab tsi?

AJAX (Asynchronous JavaScript thiab XML) yog siv los hloov kho qhov chaw ntawm nplooj ntawv uas twb muaj lawm thiab khaws cov ntaub ntawv los ntawm lub server asynchronously. AJAX txhim kho kev ua haujlwm ntawm lub vev xaib daim ntawv thov thiab ua rau daim ntawv thov sib tham ntau dua.

Tsis tas li ntawd, Ajax siv rau dab tsi? AJAX = Asynchronous JavaScript thiab XML. AJAX yog ib txoj hauv kev los tsim cov nplooj ntawv nrawm thiab nrawm. AJAX tso cai rau cov nplooj ntawv web kom hloov kho asynchronously los ntawm kev sib pauv cov ntaub ntawv me me nrog cov neeg rau zaub mov tom qab. Qhov no txhais tau hais tias nws tuaj yeem hloov kho qhov chaw ntawm nplooj ntawv web, tsis tas yuav rov qab tag nrho nplooj ntawv.

Hauv qhov no, dab tsi yog Ajax pab hauv MVC?

AJAX Helpers yog siv los tsim AJAX enabled ntsiab zoo li Ajax enabled forms thiab links uas ua tau thov asynchronously. AJAX Helpers yog cov txheej txheem txuas ntxiv ntawm AJAXHelper chav kawm uas muaj nyob hauv System. Web. Mvc npespace.

Kuv tuaj yeem tau txais cov ntaub ntawv los ntawm Ajax hauv MVC li cas?

Yuav Ua Li Cas Retrieve Cov Ntaub Ntawv Los Ntawm Database Siv jQuery AJAX Hauv MVC 5

  1. Qhib SQL Server 2014 thiab tsim ib lub rooj database.
  2. Qhib Visual Studio 2015, nyem rau ntawm New Project, thiab tsim ib lub vev xaib thov qhov project.
  3. Nyem rau ntawm Cov Cuab Yeej >> NuGet Pob Tus Thawj Tswj thiab xaiv Tswj NuGet Pob rau Kev daws.
  4. Ntxiv Entity Framework, right-click rau Models folder, xaiv Ntxiv.

Pom zoo: