Skip to content

Commit 07eef91

Browse files
authored
Merge pull request #37065 from dotnet/main
Merge to Live
2 parents 4eeb3a8 + 7fc1b8e commit 07eef91

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

aspnetcore/blazor/performance/rendering.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
title: ASP.NET Core Blazor rendering performance best practices
3+
ai-usage: ai-assisted
34
author: guardrex
45
description: Tips for improving the rendering performance of ASP.NET Core Blazor apps and avoiding common performance problems.
56
monikerRange: '>= aspnetcore-3.1'
67
ms.author: wpickett
78
ms.custom: mvc
8-
ms.date: 11/11/2025
9+
ms.date: 04/28/2026
910
uid: blazor/performance/rendering
1011
---
1112
# ASP.NET Core Blazor rendering performance best practices
@@ -331,7 +332,17 @@ In extreme cases, you can override the component's virtual <xref:Microsoft.AspNe
331332

332333
In the preceding code, returning the base class <xref:Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync%2A> runs the normal lifecycle method without assigning parameters again.
333334

334-
As you can see in the preceding code, overriding <xref:Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync%2A> and supplying custom logic is complicated and laborious, so we don't generally recommend adopting this approach. In extreme cases, it can improve rendering performance by 20-25%, but you should only consider this approach in the extreme scenarios listed earlier in this section.
335+
:::moniker range=">= aspnetcore-8.0"
336+
337+
As you can see in the preceding code, overriding <xref:Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync%2A> and supplying custom logic is complicated and laborious, so we don't generally recommend adopting this approach. In extreme cases, the approach can yield a small rendering improvement, typically under ~10% even at 10,000+ component instances when targeting .NET 10. The potential gains are smaller in later releases because reflection-based parameter assignment is optimized. Only consider this approach in the extreme scenarios listed earlier in this section and benchmark first&mdash;the savings are usually dwarfed by other costs, for example, the SignalR [diff (DOM edits)](xref:blazor/components/lifecycle#lifecycle-events) transport for Interactive Server.
338+
339+
:::moniker-end
340+
341+
:::moniker range="< aspnetcore-8.0"
342+
343+
As you can see in the preceding code, overriding <xref:Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync%2A> and supplying custom logic is complicated and laborious, so we don't generally recommend adopting this approach. In extreme cases, the approach can improve rendering performance by 20-25%, but you should only consider this approach in the extreme scenarios listed earlier in this section.
344+
345+
:::moniker-end
335346

336347
## Don't trigger events too rapidly
337348

aspnetcore/mvc/models/validation.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn about model validation in ASP.NET Core MVC and Razor Pages.
55
monikerRange: '>= aspnetcore-3.1'
66
ms.author: tdykstra
77
ms.custom: mvc
8-
ms.date: 08/28/2025
8+
ms.date: 04/28/2026
99
uid: mvc/models/validation
1010
---
1111
# Model validation in ASP.NET Core MVC and Razor Pages
@@ -153,7 +153,10 @@ To implement remote validation:
153153

154154
:::code language="csharp" source="~/mvc/models/validation/samples/6.x/ValidationSample/Models/User.cs" id="snippet_Email":::
155155

156-
[Server side validation](#custom-validation) also needs to be implemented for clients that have disabled JavaScript.
156+
Remote validation:
157+
158+
* Doesn't perform server-side validation after the form is submitted.
159+
* Doesn't perform client-side checks if the client has disabled JavaScript. If the client-side validation check is required for form processing on the server, always implement separate server-side validation.
157160

158161
### Additional fields
159162

@@ -429,6 +432,7 @@ The preceding approach won't prevent client-side validation of ASP.NET Core Iden
429432

430433
* <xref:System.ComponentModel.DataAnnotations?displayProperty=fullName>
431434
* [Model Binding](xref:mvc/models/model-binding)
435+
* <xref:blazor/forms/index>
432436

433437
:::moniker-end
434438

0 commit comments

Comments
 (0)