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.
مطالب مشابه
- اشتراکها
مروری بر ASP.NET Core View Componentاشتراکها
سری آموزشی Blazor Hybridاشتراکها
کتاب Razor Components Succinctlyاشتراکها
تغییرات ASP.NET Core در NET Core 3.1 Preview 1.مطالب
ارتقاء به ASP.NET Core 1.0 - قسمت 13 - معرفی View Componentsمطالب
کار با Razor در ASP.NET Core 2.0مطالب
ASP.NET MVC #12مطالب
ASP.NET MVC #14نظرات مطالب
ASP.NET MVC #9نظرات مطالب
ارتقاء به ASP.NET Core 1.0 - قسمت 11 - بررسی بهبودهای Razor