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

· Source: InfoQ · Field: Technology & Digital — Software Development & Engineering, Cloud Computing & IT Infrastructure · Depth: Intermediate, quick

Summary

Microsoft has released the first preview of ASP.NET Core in .NET 11, introducing significant enhancements for Blazor, OpenAPI, and general web development. Key Blazor additions include the new "EnvironmentBoundary" component for conditional content rendering and improvements to forms with "Label" and "DisplayName" components for accessible labels and metadata display. The "QuickGrid" component now features an "OnRowClick" event. Blazor navigation is enhanced with relative URI support in "NavigationManager.NavigateTo()" and "NavLink", a "GetUriWithHash()" extension, and a "BasePath" component. Blazor WebAssembly gains "IHostedService" support for background services, environment variable access via IConfiguration, and component-specific metrics. Other updates include MathML support, an "InvokeVoidAsync()" analyzer, and OpenAPI schema support for binary file responses.

Key takeaway

For web developers building Blazor applications, this .NET 11 preview streamlines common tasks and expands capabilities. You should explore the new "EnvironmentBoundary" component to manage environment-specific content and leverage the enhanced form components for improved accessibility. The added "IHostedService" support in Blazor WebAssembly also allows you to run background services directly in the browser, simplifying certain application architectures.

Key insights

ASP.NET Core in .NET 11 preview enhances Blazor with new components, navigation, and WebAssembly features.

Principles

Method

The "EnvironmentBoundary" component conditionally renders content using "Include" or "Exclude" parameters, eliminating manual environment checks across Blazor Server and WebAssembly.

In practice

Topics

Code references

Best for: Product Manager, Software Engineer, Tech Journalist

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by InfoQ.