-
Notifications
You must be signed in to change notification settings - Fork 25.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UE pass on Partial views doc #7417
Conversation
|
||
By [Steve Smith](https://ardalis.com/), [Maher JENDOUBI](https://twitter.com/maherjend), [Rick Anderson](https://twitter.com/RickAndMSFT), and [Scott Sauber](https://twitter.com/scottsauber) | ||
|
||
ASP.NET Core MVC supports partial views, which are useful when you have reusable parts of web pages you want to share between different views. | ||
ASP.NET Core MVC supports partial views, which are useful for sharing reusable parts of web pages across different views. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding --
For example, the default templates for a new web app with individual user accounts creates the following partials:
- _LoginPartial.cshtml: Called in _Layout.cshtml.
- _CookieConsentPartial: Called in _Layout.cshtml.
- _ValidationScriptsPartial.cshtml: ...
aspnetcore/mvc/views/partial.md
Outdated
|
||
### Partial view discovery | ||
|
||
When referencing a partial view, you can refer to its location in several ways. For example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feature the partial tag helper
<partial name="_CookieConsentPartial" />
We need to show that and that's it's the preferred approach.
@Rick-Anderson Please take another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
@scottaddie can you merge this then merge the live PR? |
Fixes #7322
Changes
Internal Review Page