Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions aspnetcore/blazor/components/quickgrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,18 @@ Apply a stylesheet class to a row of the grid based on the row item using the `R
In the following example:

* A row item is represented by the `Person` [record](/dotnet/csharp/language-reference/builtin-types/record). The `Person` record includes a `FirstName` property.
* The `HighlightJulie` method applies the `highlight` class styles to any row where the person's first name is "`Julie`."
* The `GetRowCssClass` method applies the `highlight-row` class styles to any row where the person's first name is "`Julie`."

```razor
<QuickGrid ... RowClass="HighlightJulie">
<QuickGrid ... RowClass="GetRowCssClass">
...
</QuickGrid>
@code {
private record Person(int PersonId, string FirstName, string LastName);
private string HighlightJulie(Person person) =>
person.FirstName == "Julie" ? "highlight" : null;
private string GetRowCssClass(Person person) =>
person.FirstName == "Julie" ? "highlight-row" : null;
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ uid: blazor/components/render-outside-of-aspnetcore

[!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.
[Razor components](xref:blazor/components/index), which are self-contained portions of user interface (UI) with processing logic used in [ASP.NET Core Blazor](xref:blazor/index), 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.

In the following example, a Razor component is rendered to an HTML string from a console app:

Expand Down
8 changes: 6 additions & 2 deletions aspnetcore/blazor/forms/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ In the preceding `StarshipPlainForm` component:

Blazor enhances page navigation and form handling by intercepting the request in order to apply the response to the existing DOM, preserving as much of the rendered form as possible. The enhancement avoids the need to fully load the page and provides a much smoother user experience, similar to a single-page app (SPA), although the component is rendered on the server. For more information, see <xref:blazor/fundamentals/routing#enhanced-navigation-and-form-handling>.

[Streaming rendering](xref:blazor/components/rendering#streaming-rendering) is supported for plain HTML forms.
<!-- UPDATE 11.0 - Check the PU issue (backlogged as of 2/27/25 -->

[Streaming rendering](xref:blazor/components/rendering#streaming-rendering) is supported for plain HTML forms. Note that when `POST`ing a form, only DOM updates inside the form's handlers are streamed (for example, `@onsubmit`). Updates inside `OnInitializedAsync` are only streamed for `GET` requests. For more information, see [Allow streaming the loading phase of POST responses (`dotnet/aspnetcore` #50994)](https://github.com/dotnet/aspnetcore/issues/50994).

[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]

Expand Down Expand Up @@ -124,7 +126,9 @@ In the preceding `Starship1` component:

Blazor enhances page navigation and form handling for <xref:Microsoft.AspNetCore.Components.Forms.EditForm> components. For more information, see <xref:blazor/fundamentals/routing#enhanced-navigation-and-form-handling>.

[Streaming rendering](xref:blazor/components/rendering#streaming-rendering) is supported for <xref:Microsoft.AspNetCore.Components.Forms.EditForm>.
<!-- UPDATE 11.0 - Check the PU issue (backlogged as of 2/27/25 -->

[Streaming rendering](xref:blazor/components/rendering#streaming-rendering) is supported for <xref:Microsoft.AspNetCore.Components.Forms.EditForm>. Note that when `POST`ing a form, only DOM updates inside the form's handlers are streamed (for example, `OnValidSubmit`). Updates inside `OnInitializedAsync` are only streamed for `GET` requests. For more information, see [Allow streaming the loading phase of POST responses (`dotnet/aspnetcore` #50994)](https://github.com/dotnet/aspnetcore/issues/50994).

[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]

Expand Down
10 changes: 10 additions & 0 deletions aspnetcore/fundamentals/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ Using the [default](#default) configuration, the `appsettings.json` and `appsett

Comments in `appsettings.json` and `appsettings.{Environment}.json` files are supported using JavaScript or [C# style comments](/dotnet/csharp/language-reference/tokens/comments).

Some integrated development environments (IDE) display errors when editing a JSON file that contains comments. You can generally ignore comment errors and warnings, but you can also usually disable them with a setting in the IDE. In Visual Studio Code, for example, add the following to the `settings.json` file to disable the errors:

```json
"files.associations": {
"appsettings*.json": "jsonc"
}
```

For other IDEs, check the tool's documentation and other product support channels to determine how to silence the errors.

<a name="optpat"></a>

### Bind hierarchical configuration data using the options pattern
Expand Down
8 changes: 4 additions & 4 deletions aspnetcore/release-notes/aspnetcore-10/includes/blazor.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
### QuickGrid `RowClass` parameter

Apply a stylesheet class to a row of the grid based on the row item using the new `RowClass` parameter. In the following example, the `ApplyRowStyle` method is called on each row to conditionally apply a stylesheet class based on the row item:
Apply a stylesheet class to a row of the grid based on the row item using the new `RowClass` parameter. In the following example, the `GetRowCssClass` method is called on each row to conditionally apply a stylesheet class based on the row item:

```razor
<QuickGrid ... RowClass="ApplyRowStyle">
<QuickGrid ... RowClass="GetRowCssClass">
...
</QuickGrid>

@code {
private string ApplyRowStyle({TYPE} rowItem) =>
rowItem.{PROPERTY} == {VALUE} ? "{CSS STYLE CLASS}" : null;
private string GetRowCssClass(MyGridItem item) =>
item.IsArchived ? "row-archived" : null;
}
```

Expand Down
4 changes: 3 additions & 1 deletion aspnetcore/security/authentication/mfa.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ MFA using TOTP is supported by default when using ASP.NET Core Identity. This ap

For implementation details, see [Enable QR Code generation for TOTP authenticator apps in ASP.NET Core](xref:security/authentication/identity-enable-qrcodes).

To disable support for MFA TOTP, configure authentication using <xref:Microsoft.Extensions.DependencyInjection.IdentityServiceCollectionExtensions.AddIdentity%2A> instead of <xref:Microsoft.Extensions.DependencyInjection.IdentityServiceCollectionUIExtensions.AddDefaultIdentity%2A>. `AddDefaultIdentity` calls <xref:Microsoft.AspNetCore.Identity.IdentityBuilderExtensions.AddDefaultTokenProviders%2A> internally, which registers multiple token providers including one for MFA TOTP. To register only specific token providers, call <xref:Microsoft.AspNetCore.Identity.IdentityBuilder.AddTokenProvider%2A> for each required provider. For more information about available token providers, see the [AddDefaultTokenProviders source on GitHub](https://github.com/dotnet/aspnetcore/blob/release/6.0/src/Identity/Core/src/IdentityBuilderExtensions.cs#L21-L32).
To disable support for MFA TOTP, configure authentication using <xref:Microsoft.Extensions.DependencyInjection.IdentityServiceCollectionExtensions.AddIdentity%2A> instead of <xref:Microsoft.Extensions.DependencyInjection.IdentityServiceCollectionUIExtensions.AddDefaultIdentity%2A>. `AddDefaultIdentity` calls <xref:Microsoft.AspNetCore.Identity.IdentityBuilderExtensions.AddDefaultTokenProviders%2A> internally, which registers multiple token providers including one for MFA TOTP. To register only specific token providers, call <xref:Microsoft.AspNetCore.Identity.IdentityBuilder.AddTokenProvider%2A> for each required provider. For more information on available token providers, see the [`AddDefaultTokenProviders` reference source (`dotnet/aspnetcore` GitHub repository)](https://github.com/dotnet/aspnetcore/blob/main/src/Identity/Core/src/IdentityBuilderExtensions.cs).

[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]

### MFA passkeys/FIDO2 or passwordless

Expand Down
1 change: 0 additions & 1 deletion aspnetcore/security/authentication/social/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Enabling users to sign in with their existing credentials:
* The `dotnet new` command creates a new Razor Pages project in the *WebApp1* folder.
* `-au Individual` creates the code for Individual authentication.
* `-uld` uses LocalDB, a lightweight version of SQL Server Express for Windows. Omit `-uld` to use SQLite.
* The `code` command opens the *WebApp1* folder in a new instance of Visual Studio Code.

---

Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/security/cors/includes/cors56.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 ...
```

In `OPTIONS` requests, the server sets the **Response headers** `Access-Control-Allow-Origin: {allowed origin}` header in the response. For example, the deployed [sample](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/security/cors/3.1sample/Cors/WebAPI), [Delete [EnableCors]](https://cors1.azurewebsites.net/test?number=2) button `OPTIONS` request contains the following headers:
In `OPTIONS` requests, the server sets the **Response headers** `Access-Control-Allow-Origin: {allowed origin}` header in the response. For example, the deployed [sample](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/security/cors/3.1sample/Cors/WebAPI), Delete button `OPTIONS` request contains the following headers:

**General headers**

Expand Down Expand Up @@ -1081,7 +1081,7 @@ Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 ...
```

In `OPTIONS` requests, the server sets the **Response headers** `Access-Control-Allow-Origin: {allowed origin}` header in the response. For example, the deployed [sample](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/security/cors/3.1sample/Cors/WebAPI), [Delete [EnableCors]](https://cors1.azurewebsites.net/test?number=2) button `OPTIONS` request contains the following headers:
In `OPTIONS` requests, the server sets the **Response headers** `Access-Control-Allow-Origin: {allowed origin}` header in the response. For example, the deployed [sample](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/security/cors/3.1sample/Cors/WebAPI), Delete button `OPTIONS` request contains the following headers:

**General headers**

Expand Down
Loading