Subtemplate
A subtemplate is a reusable template fragment that can be rendered independently or included within another template to produce part of an output.
Django in Action
A subtemplate is a reusable template fragment that can be rendered independently as an HTML response segment or included in another template.
- How it is used
- Composes Django pages from reusable HTML fragments and supplies targeted HTMX response segments.
- How deep it goes
- Explains inclusion, passed context, conditional markup, and request-dependent partial rendering without detailing template-engine internals.
- Examples
- Uses blog fragments, a pagination footer, musician search results, and editable venue-room rows.
- What you can do after
- Apply it via Django {% include %} to reuse markup and return focused HTMX updates.
ASP.NET Core in Action, 3e
A partial Razor view is a reusable Razor view fragment that can be rendered within another view or layout.
- How it is used
- Reuses HTML fragments across Razor Pages or layouts and breaks large views into manageable pieces.
- How deep it goes
- Works through a model-typed partial, its Tag Helper call, and basic lookup; distinguishes rendering from request handling.
- Examples
- Shows a reusable to-do item template rendered in a loop and a login-links partial rendered in a layout.
- What you can do after
- Build it from scratch using a model-typed .cshtml partial and render it with the <partial /> Tag Helper.
Pro ASP.NET Core 7, Tenth Edition
A partial view is a reusable view fragment containing markup and Razor directives that receives its data from a parent view.
- How it is used
- Reuses HTML and Razor fragments across parent views without copying markup.
- How deep it goes
- Works through CSHTML creation, tag-helper setup, model passing, nested partials, and lookup; defers detailed tag-helper treatment.
- Examples
- Uses product-summary cards, product-table rows, a nested table cell, shared product details, and form-validation markup.
- What you can do after
- Build it from scratch as a CSHTML partial and apply it in MVC views or Razor Pages.
Read how Pro ASP.NET Core 7, Tenth Edition explains subtemplate →
Related concepts
- view componentcontrasts with · A view component is a reusable presentation component that encapsulates application logic and renders a portion of a user interface or response.
- view modeluses · A view model is a data structure that supplies a user-interface view with the data required to render a particular output.
- partial elementused by · A partial element is an ASP.NET Core HTML-like element that invokes a partial view and supplies its view model.
- Razor compilerused by · The Razor compiler transforms Razor files containing markup and code into generated classes or output for execution by an ASP.NET Core application.
- Razor Pagesused by · Razor Pages is an ASP.NET Core page-focused programming model in which independently addressable pages combine Razor markup with request-handling logic.
- Tag Helpersuses · Tag Helpers are ASP.NET Core components that process HTML-like elements during Razor view or page rendering.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


