- Home
- /
- Foundation
- /
- DMBPageBuilder
- /
- Introduction
Captures the body first, lets components register page-level dependencies, then renders the final document.
Provides the base classes and conventions used to compose tags, attributes, styles and reusable rendering blocks.
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.
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.
PageRegistryBuilder 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 .
PageInformationCore 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.