Enhance partial page description (#19975)
parent
bef0ac9dc8
commit
8c4f7a4325
|
@ -12,7 +12,7 @@ uid: mvc/views/partial
|
|||
|
||||
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)
|
||||
|
||||
A partial view is a [Razor](xref:mvc/views/razor) markup file (*.cshtml*) that renders HTML output *within* another markup file's rendered output.
|
||||
A partial view is a [Razor](xref:mvc/views/razor) markup file (*.cshtml*) without an [`@page`](xref:mvc/views/razor#page) directive that renders HTML output *within* another markup file's rendered output.
|
||||
|
||||
::: moniker range=">= aspnetcore-2.1"
|
||||
|
||||
|
@ -41,7 +41,7 @@ Don't use a partial view where complex rendering logic or code execution is requ
|
|||
|
||||
::: moniker range=">= aspnetcore-2.0"
|
||||
|
||||
A partial view is a *.cshtml* markup file maintained within the *Views* folder (MVC) or *Pages* folder (Razor Pages).
|
||||
A partial view is a *.cshtml* markup file without an [`@page`](xref:mvc/views/razor#page) directive maintained within the *Views* folder (MVC) or *Pages* folder (Razor Pages).
|
||||
|
||||
In ASP.NET Core MVC, a controller's <xref:Microsoft.AspNetCore.Mvc.ViewResult> is capable of returning either a view or a partial view. In Razor Pages, a <xref:Microsoft.AspNetCore.Mvc.RazorPages.PageModel> can return a partial view represented as a <xref:Microsoft.AspNetCore.Mvc.PartialViewResult> object. Referencing and rendering partial views is described in the [Reference a partial view](#reference-a-partial-view) section.
|
||||
|
||||
|
|
Loading…
Reference in New Issue