https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-components?view=aspnetcore-6.0
https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-components?view=aspnetcore-6.0
View components search path
The runtime searches for the view in the following paths:
视图搜索路径,运行时在以下路径中搜索视图:
Step 1:Create two folders for view component
Create the /Components folder
Create the Views/Shared/Components folder.
(This folder must be named Components.)
Step 2:Creating a view component
Add a ViewComponent class
/Components folder
Step 3:Invoking a view component
0