Introduction — PageBuilder

The HTML rendering foundation for the DMB builder stack.

Rendering Pipeline

Captures the body first, lets components register page-level dependencies, then renders the final document.

Builder Primitives

Provides the base classes and conventions used to compose tags, attributes, styles and reusable rendering blocks.

Integration Base

Supports higher-level packages such as DMBBootstrapBuilder, DMBEffectBuilder and DMBDocumentationViewer.

What is PageBuilder?

DMBPageBuilder is the lowest-level rendering package in the stack. It gives ASP.NET Core applications a disciplined way to produce HTML from C# builders, while keeping page metadata, body rendering, attributes, classes, styles, scripts and links inside a predictable pipeline.

Use it when you want explicit server-side HTML generation without letting view helpers, partials, inline conditions and duplicated attribute logic grow independently. PageBuilder is intentionally generic: it does not try to be Bootstrap, an effect library or a documentation engine — it is the foundation those packages build on.

Deterministic HTML Output: The same builder call produces the same markup every time — no view state, no hidden conditionals.
Dependency Collection Before Render: Scripts, stylesheets and metadata are registered during body rendering, then flushed in the correct document positions.
Foundation for All Builders: Every package in the DMB stack inherits PageBuilder's composition model, ensuring consistent rendering behaviour across the ecosystem.
PageInformation page =
    PageRegistry.GetOrCreatePageInformation(
        httpContext);

page.SetScriptFile("/js/myScript.js");
page.SetStylesheet("/css/myStyle.css");

How PageBuilder registers page-level assets during the rendering pipeline.

Three Pillars of PageBuilder

PageBuilder is organised around three core responsibilities that all higher-level packages rely on.

Rendering Pipeline

Captures the body first, lets components register page-level dependencies, then renders the final document.

PageRegistry
Builder Primitives

Provides the base classes and conventions used to compose tags, attributes, styles and reusable rendering blocks.

HtmlComponentBuilderBase<T>
Integration Base

Supports higher-level packages such as DMBBootstrapBuilder , DMBEffectBuilder and DMBDocumentationViewer .

PageInformation

Core Philosophy

We believe HTML generation should be explicit and predictable. When you use HtmlComponentBuilderBase<T> , you control every attribute, class, and rendered element — no hidden markup, no magic template interpolation. What you build is exactly what the browser receives.

Next Step

Learn how to integrate the layout pipeline in your ASP.NET Core project.

Getting Started