ASP.NET Core in .NET 11 Preview 1 Brings New Blazor Components, Improved Navigation, and WebAssembly
#Regulation

ASP.NET Core in .NET 11 Preview 1 Brings New Blazor Components, Improved Navigation, and WebAssembly

Serverless Reporter
2 min read

Microsoft has released the first preview of ASP.NET Core in .NET 11, introducing a range of new features and improvements aimed at enhancing the developer experience across Blazor, OpenAPI, and general web development workflows.

Microsoft has released the first preview of ASP.NET Core in .NET 11, introducing a range of new features and improvements aimed at enhancing the developer experience across Blazor, OpenAPI, and general web development workflows. Among the most notable additions is the new EnvironmentBoundary component for Blazor, which allows developers to conditionally render content based on the hosting environment. The component accepts Include and Exclude parameters and works consistently across both Blazor Server and Blazor WebAssembly, removing the need for manual environment checks.

Featured image

The release also brings several improvements to Blazor forms. A new Label component now renders accessible labels with automatic extraction of display names from metadata attributes. It supports both nested and non-nested label-input association patterns. Alongside it, a new DisplayName component provides functionality similar to MVC's @Html.DisplayNameFor() helper, making it easier to display property names from attributes with localization support.

The QuickGrid component has gained an OnRowClick event parameter, enabling developers to handle row click interactions directly. When configured, the grid automatically applies pointer cursor styling and invokes a callback with the clicked item.

Furthermore, navigation in Blazor has also received attention. The NavigationManager.NavigateTo() method and the NavLink component now support relative URI navigation through a new RelativeToCurrentUri parameter. This allows navigation relative to the current page path rather than the application's base URI, which is particularly useful for nested folder structures. Additionally, a new GetUriWithHash() extension method offers a zero-allocation way to append hash fragments to URIs, and a new BasePath component replaces the need for manually specifying base href elements in HTML.

On the WebAssembly side, Blazor WebAssembly now supports IHostedService for running background services in the browser, bringing feature parity with Blazor Server. The framework also now allows access to environment variables through IConfiguration, enabling runtime configuration without rebuilding the application. Component-specific metrics and tracing have also been added for WebAssembly apps.

Other changes in this release include MathML namespace support for interactive rendering, a new InvokeVoidAsync() analyzer, the IComponentPropertyActivator interface for customizing dependency injection on components, SignalR ConfigureConnection support for Interactive Server components, a unified startup options format for Blazor scripts. Also, other changes are OpenAPI schema support for binary file responses, the IOutputCachePolicyProvider interface, container support in the Blazor Web App template, and automatic trust of development certificates in WSL environments.

For interested readers, the full release notes are available on the official ASP.NET Core documentation, and the project roadmap can be found on GitHub.

Comments

Loading comments...