diff --git a/release-notes/11.0/preview/preview1/aspnetcore.md b/release-notes/11.0/preview/preview1/aspnetcore.md index 69ab76c883..422febc9a7 100644 --- a/release-notes/11.0/preview/preview1/aspnetcore.md +++ b/release-notes/11.0/preview/preview1/aspnetcore.md @@ -1,11 +1,32 @@ # ASP.NET Core in .NET 11 Preview 1 - Release Notes -Here's a summary of what's new in ASP.NET Core in this preview release. +Here's a summary of what's new in ASP.NET Core in this preview release: -ASP.NET Core updates in .NET 11: +- [EnvironmentBoundary component](#environmentboundary-component) +- [Label component for forms](#label-component-for-forms) +- [DisplayName component](#displayname-component) +- [QuickGrid `OnRowClick` event](#quickgrid-onrowclick-event) +- [Relative navigation with `RelativeToCurrentUri`](#relative-navigation-with-relativetocurrenturi) +- [`GetUriWithHash()` extension method](#geturiwithhash-extension-method) +- [BasePath component](#basepath-component) +- [MathML namespace support](#mathml-namespace-support) +- [`InvokeVoidAsync()` analyzer](#invokevoidasync-analyzer) +- [`IComponentPropertyActivator`](#icomponentpropertyactivator) +- [SignalR `ConfigureConnection` for Interactive Server components](#signalr-configureconnection-for-interactive-server-components) +- [Unified startup options format for Blazor scripts](#unified-startup-options-format-for-blazor-scripts) +- [`IHostedService` support in Blazor WebAssembly](#ihostedservice-support-in-blazor-webassembly) +- [Environment variables in Blazor WebAssembly configuration](#environment-variables-in-blazor-webassembly-configuration) +- [Blazor WebAssembly component metrics and tracing](#blazor-webassembly-component-metrics-and-tracing) +- [Enable container support in Blazor Web App template](#enable-container-support-in-blazor-web-app-template) +- [OpenAPI schema support for binary file responses](#openapi-schema-support-for-binary-file-responses) +- [`IOutputCachePolicyProvider`](#ioutputcachepolicyprovider) +- [Auto-trust development certificates in WSL](#auto-trust-development-certificates-in-wsl) -- [What's new in ASP.NET Core in .NET 11](https://learn.microsoft.com/aspnet/core/release-notes/aspnetcore-11.0) documentation. -- [Breaking changes](https://learn.microsoft.com/dotnet/core/compatibility/11.0#aspnet-core) +ASP.NET Core updates in .NET 11 Preview 1: + +- [Release notes](aspnetcore.md) +- [What's new in ASP.NET Core in .NET 11](https://learn.microsoft.com/aspnet/core/release-notes/aspnetcore-11) documentation. +- [Breaking changes](https://learn.microsoft.com/aspnet/core/breaking-changes/11/overview) - [Roadmap](https://github.com/dotnet/aspnetcore/issues/59443) .NET 11 Preview 1: @@ -13,4 +34,497 @@ ASP.NET Core updates in .NET 11: - [Discussion](https://aka.ms/dotnet/11/preview1) - [Release notes](README.md) -This Preview 1 release does not contain new ASP.NET Core feature additions. +## EnvironmentBoundary component + +Blazor now includes a built-in `EnvironmentBoundary` component for conditional rendering based on the hosting environment. This component is similar to the MVC environment tag helper and provides a consistent way to render content based on the current environment across both server and WebAssembly hosting models. + +The `EnvironmentBoundary` component accepts `Include` and `Exclude` parameters for specifying environment names. The component performs case-insensitive matching and follows the same semantics as the MVC `EnvironmentTagHelper`. + +```razor +@using Microsoft.AspNetCore.Components.Web + + +
+ Debug mode enabled +
+
+ + +

Pre-production environment

+
+ + +

@DateTime.Now

+
+``` + +The component works consistently in both Blazor Server and Blazor WebAssembly scenarios by injecting `IHostEnvironment`, eliminating the need for manual environment checks and conditional logic. + +## Label component for forms + +A new `Label` component has been added to Blazor forms that renders accessible labels with support for both nested and non-nested patterns. The component automatically extracts display names from `[Display]` or `[DisplayName]` attributes, falling back to the property name if no attributes are present. + +The `Label` component supports two common label-input association patterns: + +**Nested pattern** (implicit association): + +```razor + +``` + +Renders: + +```html + +``` + +**Non-nested pattern** (for/id association): + +```razor +