Muaj pes tsawg hom kev pom nyob hauv MVC?
Muaj pes tsawg hom kev pom nyob hauv MVC?

Video: Muaj pes tsawg hom kev pom nyob hauv MVC?

Video: Muaj pes tsawg hom kev pom nyob hauv MVC?
Video: Hwm Pheej Thoj - Rov Mus Txog Vib Nais 2024, Kaum ib hlis
Anonim

Raws li cov ntaub ntawv hloov pauv mechanism ASP. NET MVC saib yog categorized li ob hom , Dynamic saib . Ntaus ntaus saib.

Hauv qhov no, MVC saib yog dab tsi?

Saib yog tus neeg siv interface. Saib qhia cov ntaub ntawv los ntawm tus qauv rau tus neeg siv thiab tseem ua rau lawv hloov kho cov ntaub ntawv. ASP. NET MVC saib yog khaws cia rau hauv Saib nplaub tshev. Shared folder muaj saib , layouts lossis ib nrab saib uas yuav muab faib ua ntau yam saib.

Tsis tas li ntawd, cov ntaub ntawv Cshtml yog dab tsi? cshtml ua yog cov ntaub ntawv extension uas hais txog rab chais saib cav. Ntxiv rau qhov ncaj html, cov no cov ntaub ntawv kuj tseem muaj C# code uas tau muab tso ua ke ntawm tus neeg rau zaub mov ua ntej cov nplooj ntawv raug server mus txog qhov browser..

Yog li ntawd, dab tsi yog qhov kev pom zoo hauv MVC?

Strongly typed views yog siv rau rendering tej yam qauv cov khoom, tsis yog siv cov qauv ViewData dav dav. Los ntawm kev qhia cov hom ntawm cov ntaub ntawv, koj tau nkag mus rau IntelliSense rau lub qauv chav kawm.

Dab tsi yog qhov rov qab saib hauv MVC?

Tus cwj pwm default ntawm tus Saib txoj kev ( rov View ();) yog rov qab los a saib nrog tib lub npe raws li txoj kev txiav txim los ntawm nws hu ua. Piv txwv li, Txog ActionResult txoj kev npe ntawm tus maub los yog siv los tshawb nrhiav a saib cov ntaub ntawv npe Txog. cshtml ua.

Pom zoo: