Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/components/class-libraries-with-static-ssr
---
# ASP.NET Core Razor class libraries (RCLs) with static server-side rendering (static SSR)

<!-- UPDATE 9.0 Activate after release and INCLUDE is updated

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article provides guidance for component library authors considering support for static server-side rendering (static SSR).

Expand Down
6 changes: 1 addition & 5 deletions aspnetcore/blazor/components/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/components/integration
---
# Integrate ASP.NET Core Razor components into ASP.NET Core apps

<!-- UPDATE 9.0 Activate after release and INCLUDE is updated

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article explains Razor component integration scenarios for ASP.NET Core apps.

Expand Down
6 changes: 1 addition & 5 deletions aspnetcore/blazor/components/prerender.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/components/prerender
---
# Prerender ASP.NET Core Razor components

<!-- UPDATE 9.0 Activate after release and INCLUDE is updated

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

<!--
NOTE: The console output block quotes in this topic use a double-space
Expand Down
6 changes: 1 addition & 5 deletions aspnetcore/blazor/components/quickgrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/components/quickgrid
---
# ASP.NET Core Blazor `QuickGrid` component

<!-- UPDATE 9.0 Enable the following

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

The [`QuickGrid`](xref:Microsoft.AspNetCore.Components.QuickGrid) component is a Razor component for quickly and efficiently displaying data in tabular form. `QuickGrid` provides a simple and convenient data grid component for common grid rendering scenarios and serves as a reference architecture and performance baseline for building data grid components. `QuickGrid` is highly optimized and uses advanced techniques to achieve optimal rendering performance.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/components/render-outside-of-aspnetcore
---
# Render Razor components outside of ASP.NET Core

<!-- UPDATE 9.0 Activate after release and INCLUDE is updated

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

Razor components can be rendered outside of the context of an HTTP request. You can render Razor components as HTML directly to a string or stream independently of the ASP.NET Core hosting environment. This is convenient for scenarios where you want to generate HTML fragments, such as for generating email content, generating static site content, or for building a content templating engine.

Expand Down
33 changes: 26 additions & 7 deletions aspnetcore/blazor/components/render-modes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/components/render-modes
---
# ASP.NET Core Blazor render modes

<!-- UPDATE 9.0 Activate after release and INCLUDE is updated

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article explains control of Razor component rendering in Blazor Web Apps, either at compile time or runtime.

Expand Down Expand Up @@ -230,7 +226,30 @@ The <xref:Microsoft.AspNetCore.Components.ComponentBase.RendererInfo?displayProp
* `InteractiveAuto` for Interactive Auto.
* `InteractiveWebAssembly` for Interactive WebAssembly.

Components use these properties to render content depending on their location or interactivity status. For example, a form can be disabled during prerendering and enabled when the component becomes interactive:
Components use these properties to render content depending on their location or interactivity status. The following examples demonstrate typical use cases.

Display content until a component is interactive:

```razor
@if (!RendererInfo.IsInteractive)
{
<p>Connecting to the assistant...</p>
}
else
{
...
}
```

Disable a button until a component is interactive:

```razor
<button @onclick="Send" disabled="@(!RendererInfo.IsInteractive)">
Send
</button>
```

Disable a form during prerendering and enable the form when the component is interactive:

```razor
<EditForm Model="Movie" ...>
Expand Down Expand Up @@ -260,7 +279,7 @@ Components use these properties to render content depending on their location or
}
```

The next example shows how to render markup to support performing a regular HTML action if the component is statically rendered:
Render markup to support performing a regular HTML action if the component is statically rendered:

```razor
@if (AssignedRenderMode is null)
Expand Down
6 changes: 1 addition & 5 deletions aspnetcore/blazor/components/sections.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/components/sections
---
# ASP.NET Core Blazor sections

<!-- UPDATE 9.0 Activate after release and INCLUDE is updated

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article explains how to control the content in a Razor component from a child Razor component.

Expand Down
57 changes: 46 additions & 11 deletions aspnetcore/blazor/fundamentals/signalr.md
Original file line number Diff line number Diff line change
Expand Up @@ -491,43 +491,71 @@ In the `Program` file, call <xref:Microsoft.AspNetCore.Builder.ComponentEndpoint

## Reflect the server-side connection state in the UI

When the client detects that the connection has been lost, a default UI is displayed to the user while the client attempts to reconnect. If reconnection fails, the user is provided the option to retry.
If the client detects a lost connection to the server, a default UI is displayed to the user while the client attempts to reconnect:

:::moniker range=">= aspnetcore-9.0"

![The default reconnection UI.](signalr/_static/reconnection-ui-90-or-later.png)

:::moniker-end

:::moniker range="< aspnetcore-9.0"

![The default reconnection UI.](signalr/_static/reconnection-ui-80-or-earlier.png)

:::moniker-end

If reconnection fails, the user is instructed to retry or reload the page:

:::moniker range=">= aspnetcore-9.0"

![The default retry UI.](signalr/_static/retry-ui-90-or-later.png)

:::moniker-end

:::moniker range="< aspnetcore-9.0"

![The default retry UI.](signalr/_static/retry-ui-80-or-earlier.png)

:::moniker-end

If reconnection succeeds, user state is often lost. Custom code can be added to any component to save and reload user state across connection failures. For more information, see <xref:blazor/state-management>.

:::moniker range=">= aspnetcore-8.0"

To customize the UI, define a single element with an `id` of `components-reconnect-modal`. The following example places the element in the `App` component.
To customize the UI, define a single element with an `id` of `components-reconnect-modal` in the `<body>` element content. The following example places the element in the `App` component.

`App.razor`:

:::moniker-end

:::moniker range=">= aspnetcore-7.0 < aspnetcore-8.0"

To customize the UI, define a single element with an `id` of `components-reconnect-modal`. The following example places the element in the host page.
To customize the UI, define a single element with an `id` of `components-reconnect-modal` in the `<body>` element content. The following example places the element in the host page.

`Pages/_Host.cshtml`:

:::moniker-end

:::moniker range=">= aspnetcore-6.0 < aspnetcore-7.0"

To customize the UI, define a single element with an `id` of `components-reconnect-modal`. The following example places the element in the layout page.
To customize the UI, define a single element with an `id` of `components-reconnect-modal` in the `<body>` element content. The following example places the element in the layout page.

`Pages/_Layout.cshtml`:

:::moniker-end

:::moniker range="< aspnetcore-6.0"

To customize the UI, define a single element with an `id` of `components-reconnect-modal`. The following example places the element in the host page.
To customize the UI, define a single element with an `id` of `components-reconnect-modal` in the `<body>` element content. The following example places the element in the host page.

`Pages/_Host.cshtml`:

:::moniker-end

```cshtml
<div id="components-reconnect-modal">
There was a problem with the connection!
Connection lost.<br>Attempting to reconnect...
</div>
```

Expand Down Expand Up @@ -557,6 +585,15 @@ Add the following CSS styles to the site's stylesheet.
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
display: block;
background-color: white;
padding: 2rem;
border-radius: 0.5rem;
text-align: center;
box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
margin: 50px 50px;
position: fixed;
top: 0;
z-index: 10001;
}
```

Expand All @@ -581,7 +618,7 @@ Customize the delay before the reconnection UI appears by setting the `transitio

:::moniker-end

:::moniker range="< aspnetcore-8.0"
:::moniker range=">= aspnetcore-5.0 < aspnetcore-8.0"

`wwwroot/css/site.css`:

Expand All @@ -606,11 +643,9 @@ To display the current reconnect attempt, define an element with an `id` of `com
</div>
```

When the custom reconnect modal appears, it renders content similar to the following based on the preceding code:
When the custom reconnect modal appears, it renders the following content with a reconnection attempt counter:

```html
There was a problem with the connection! (Current reconnect attempt: 3 / 8)
```
> :::no-loc text="There was a problem with the connection! (Current reconnect attempt: 1 / 8)":::

:::moniker-end

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 1 addition & 5 deletions aspnetcore/blazor/hybrid/troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/hybrid/troubleshoot
---
# Troubleshoot ASP.NET Core Blazor Hybrid

<!-- UPDATE 9.0 Activate after release and INCLUDE is updated

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

<xref:Microsoft.AspNetCore.Components.WebView.Maui.BlazorWebView> has built-in logging that can help you diagnose problems in your Blazor Hybrid app.

Expand Down
2 changes: 2 additions & 0 deletions aspnetcore/blazor/hybrid/tutorials/maui-blazor-web-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ uid: blazor/hybrid/tutorials/maui-blazor-web-app
---
# Build a .NET MAUI Blazor Hybrid app with a Blazor Web App

[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article shows you how to build a .NET MAUI Blazor Hybrid app with a Blazor Web App that uses a shared user interface via a Razor class library (RCL).

## Prerequisites and preliminary steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/js-interop/ssr
---
# ASP.NET Core Blazor JavaScript with static server-side rendering (static SSR)

<!-- UPDATE 9.0 Activate after release and INCLUDE is updated

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article explains how to load JavaScript (JS) in a Blazor Web App with static server-side rendering (static SSR) and [enhanced navigation](xref:blazor/fundamentals/routing#enhanced-navigation-and-form-handling).

Expand Down
6 changes: 1 addition & 5 deletions aspnetcore/blazor/security/blazor-web-app-with-oidc.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ zone_pivot_groups: blazor-web-app-oidc-specification
---
# Secure an ASP.NET Core Blazor Web App with OpenID Connect (OIDC)

<!-- UPDATE 9.0 Activate after release and INCLUDE is updated

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article describes how to secure a Blazor Web App with [OpenID Connect (OIDC)](https://openid.net/developers/how-connect-works/) using a sample app in the [`dotnet/blazor-samples` GitHub repository (.NET 8 or later)](https://github.com/dotnet/blazor-samples) ([how to download](xref:blazor/fundamentals/index#sample-apps)).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ uid: blazor/security/server/account-confirmation-and-password-recovery
---
# Account confirmation and password recovery in ASP.NET Core Blazor

[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article explains how to configure an ASP.NET Core Blazor Web App with email confirmation and password recovery.

## Namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ uid: blazor/security/server/qrcodes-for-authenticator-apps
---
# Enable QR code generation for TOTP authenticator apps in an ASP.NET Core Blazor Web App

[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article explains how to configure an ASP.NET Core Blazor Web App with QR code generation for TOTP authenticator apps.

For an introduction to two-factor authentication (2FA) with authenticator apps using a Time-based One-time Password Algorithm (TOTP), see <xref:security/authentication/identity-enable-qrcodes>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/security/server/static-server-side-rendering
---
# Threat mitigation guidance for ASP.NET Core Blazor static server-side rendering

<!-- UPDATE 9.0 Activate after release and INCLUDE is updated

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article explains the security considerations that developers should take into account when developing Blazor Web Apps with static server-side rendering.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/security/webassembly/meid-groups-roles
---
# Microsoft Entra (ME-ID) groups, Administrator Roles, and App Roles

<!-- UPDATE 9.0 Activate at 9.0 GA.

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article explains how to configure Blazor WebAssembly to use Microsoft Entra ID (ME-ID) groups and roles.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/security/webassembly/standalone-with-identity
---
# Secure ASP.NET Core Blazor WebAssembly with ASP.NET Core Identity

<!-- UPDATE 9.0 Activate after release and INCLUDE is updated

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

Standalone Blazor WebAssembly apps can be secured with ASP.NET Core Identity by following the guidance in this article.

Expand Down
6 changes: 1 addition & 5 deletions aspnetcore/blazor/tutorials/movie-database-app/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ uid: blazor/tutorials/movie-database-app/index
---
# Build a Blazor movie database app (Overview)

<!-- UPDATE 9.0 Activate after release

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This tutorial explains the basics of building a Blazor Web App with a database, Entity Framework (EF) Core, and user interactivity.

Expand Down
6 changes: 1 addition & 5 deletions aspnetcore/blazor/tutorials/movie-database-app/part-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ zone_pivot_groups: tooling
---
# Build a Blazor movie database app (Part 1 - Create a Blazor Web App)

<!-- UPDATE 9.0 Activate after release

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article is the first part of the Blazor movie database app tutorial that teaches you the basics of building an ASP.NET Core Blazor Web App with features to manage a movie database.

Expand Down
6 changes: 1 addition & 5 deletions aspnetcore/blazor/tutorials/movie-database-app/part-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ zone_pivot_groups: tooling
---
# Build a Blazor movie database app (Part 2 - Add and scaffold a model)

<!-- UPDATE 9.0 Activate after release

[!INCLUDE[](~/includes/not-latest-version.md)]

-->
[!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)]

This article is the second part of the Blazor movie database app tutorial that teaches you the basics of building an ASP.NET Core Blazor Web App with features to manage a movie database.

Expand Down
Loading
Loading