عنوان:

‫باید از View Componentها به جای Partial Viewها در ASP.NET Core استفاده کنید


نویسنده: کوشککی
تاریخ: ۱۳۹۷/۰۶/۲۴ ۱۵:۲۶
آدرس: www.dntips.ir

Why use View Components and not Partial Views? The biggest reason is that when inserting a Partial View into a Razor page, all the ViewData associated with the calling View is automatically associated with the Partial View. This means that a Partial View may behave very differently on one Razor page than on another. With View Components, you control what gets shared to your View Components. 



مشاهده مطلب اصلی