GUI frameworks for .NET – Part 4: Web frameworks
The generic term ASP.NET Core covers several frameworks for the web. Blazor, the most modern, is further divided into four variants.
(Image: erzeugt mit KI durch iX)
- Dr. Holger Schwichtenberg
None of the .NET-based GUI frameworks presented so far in this series can be used in a web browser. When asked what Microsoft offers for browser applications, one could now give a general answer with ASP.NET Core, but this would not do justice to the fact that ASP.NET Core is a generic term for several frameworks, both for WebAPIs/Web services and for Web user interfaces with HTML and CSS.
There are three frameworks in ASP.NET Core for creating HTML/CSS interfaces:
- NET Core Model View Controller (successor to ASP.NET MVC in the classic .NET Framework, in modern .NET since .NET Core 1.0)
- NET Core Razor Pages (new since .NET Core 2.0)
- NET Core Blazor (new since .NET Core 3.0)
Blazor is further subdivided into four types:
- Blazor Static Server Side Rendering
- Blazor Interactive Server Side Rendering (alias Blazor Server)
- Blazor Client Side Rendering (aka Blazor WebAssembly)
- Blazor Hybrid (can be divided into Blazor Desktop and Blazor MAUI)
HTML vs. XAML
All the frameworks mentioned render HTML interfaces in contrast to the frameworks presented so far in this series, which create code-based interfaces (Windows Forms) or work with XAML (eXtensible Application Markup Language) for GUI definition (WPF, WinUI 3, .NET MAUI). XAML and HTML have a lot in common: They are both markup languages with tags (elements with attributes and content in the style <element attribute="value">content</element>).
In both languages, a tree structure is created that can be defined statically at development time or generated dynamically at runtime. There is an API for reading and modifying the tree in each case. In XAML, each tag must have a corresponding .NET class. Invalid names of elements and attributes are already rejected by the compiler. In HTML, unknown element and attribute names are simply ignored even in the browser, but can be processed in the Document Object Model (DOM) by the metaobject model (HtmlElement). HTML is therefore more flexible for extensions, but troubleshooting typos is more difficult. Another difference is that in XAML there is not just one but two trees: the logical tree of tags and the visual tree, in which all control elements are divided into their components, for example frame and content.
HTML, if you add CSS and in some cases JavaScript, has a similar graphical expressiveness to XAML, but occasionally the tag sequences are more concise in one language or the other, which often leads to heated discussions, such as this one from 2024 on Reddit. But it's worth noting: SVG is not as well integrated in all XAML dialects as it is in HTML.
While HTML comes from the browser world and XAML from the desktop, it can be summarized today that both languages can be used inside and outside the browser. However, XAML applications are only an alternative for search engines if they are converted into HTML using a framework. The Uno Platform does enable conversion from XAML to HTML, but only on the client side, not via server-side rendering. This does not help Google & Co. With XAML, the performance is only dependent on the hardware and operating system. With HTML, the web browser used also plays an important role.
XAML is a proprietary markup language from Microsoft with various dialects. HTML, on the other hand, is an official standard (formerly of the W3C, now of the WHATWG). However, even in 2025, there are still differences in the implementation of the HTML 5 version published in 2014 in the various web browsers (see caniuse.com).
There are significantly more and more complex controls in each of the XAML dialects than in HTML, and the control sets differ in different XAML dialects. Higher-quality controls in HTML with the use of CSS and JavaScript are available, like sand by the sea, free of charge from the community or from commercial providers. These HTML controls compensate for browser differences themselves or rely on available polyfills. While data binding exists at the core of all XAML dialects, a web front-end framework is still required for this in HTML today. Even though there are other framework providers for XAML besides Microsoft (Avalonia and Uno, which are covered in parts 5 and 6 of this series) and some control providers, the HTML ecosystem is significantly larger.
Videos by heise
ASP.NET Core MVC & Razor Pages & Blazor Static SSR
ASP.NET Core Model View Controller, ASP.NET Core Razor Pages and Blazor Static Server Side Rendering are comparable because they create a Multi-Page Web Application (MPA) with full-page tours. The program code (only C# is possible in modern .NET, in the classic .NET Framework with ASP.NET MVC, Visual Basic .NET was also available as an alternative) runs on the web server. An HTTP request is received, a class is instantiated on the server, which produces HTML and CSS. With ASP.NET Core MVC, this job is performed by a controller and a view. With Razor Pages, Microsoft speaks of Page Model and Razor Page. With Blazor, it is a Razor Component.
These three architectures are very similar (see the top four lines in Figure 1). The choice here is easy, however, because Blazor Static Server Side Rendering is the newest of the three models with the most advanced template syntax, a true component model, streaming HTML content from asynchronous methods in the same HTTP response, and Enhanced Navigation, which in some cases prevents the page from flickering in the browser.
(Image:Â Holger Schwichtenberg)
Microsoft does not provide any controls with ASP.NET Core MVC and Razor Pages: You work with the HTML standard input controls, of which there is a minimal abstraction in the form of so-called tag helpers (elements and attributes) and HTML helpers (methods), for example for validation. If you need more functions, you can fall back on commercial third-party components, which are typically packed with JavaScript (see Table 1).
| Hersteller | Produktname |
| Syncfusion | ASP.NET Core UI Controls Library |
| DevExpress | ASP.NET Core Components |
| Telerik | UI for ASP.NET Core |
| Infragistics | Ignite UI for ASP.NET Core |
| Mescius (vormals GrapeCity) | ComponentOne ASP.NET Core MVC Controls |
Table 1: Selected GUI component providers for ASP.NET Core MVC
In Blazor Static Server Side Rendering there are some built-in Razor components (for example <InputNumber> instead of <input type="number">) at a similar level of abstraction and with a validation option. There is also a data table control (QuickGrid), which, however, does not allow any inline input by default and only enables some features such as sorting and scrolling if you use one of the other interactive Blazor variants (Blazor Server, Blazor WebAssembly, Blazor Auto-Rendering). More on this later.
Microsoft offers a range of controls for Blazor in Fluent Design under the name Fluent UI Blazor Library (such as Menu, Dialog, MessageBox, Wizard, Tree View, Drag & Drop, Card, Accordion, Slider, Splitter, Rating, Autocomplete), including project templates, but all without support and with restrictions for static Blazor rendering. One of the interactive versions of Blazor is also required for all functions. The Fluent UI QuickGrid based DataGrid contained in the Fluent UI Blazor Library also has no built-in input support; there are no components for diagrams at all.
A WYSIWYG designer is again not available, nor is there a live preview within Visual Studio, but hot reloading has been available since .NET 6.0. Deployment to an ASP.NET Core-capable web server (ASP.NET Core must be installed beforehand for Internet Information Services!) is carried out from Visual Studio or with command line tools, via the file system, FTP or the web deploy procedure available for Internet Information Services. Self-hosting is also very easy, as an .EXE file is created during compilation, which starts the Kestrel web server integrated in ASP.NET Core.
The display capabilities in HTML and CSS (possibly supported with JavaScript and JavaScript-based frameworks, for example for animations and data binding) essentially correspond to what eXtensible Application Markup Language (XAML) can do. XAML still has the advantage of better Windows integration, for example with regard to font display, screen readers and printing. XAML also scores points because it implements in a language with a standardized, declarative syntax what is distributed across HTML, CSS and JavaScript in the web world. However, XAML is far less universally applicable than the web technologies, although XAML is now also available outside of Windows with Avalonia and Uno (more on this will follow in parts 6 and 7 of this series).