You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/blazor/components/quickgrid.md
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,18 +138,36 @@ To provide a UI for pagination, add a [`Paginator` component](xref:Microsoft.Asp
138
138
139
139
In the running app, page through the items using a rendered `Paginator` component.
140
140
141
-
QuickGrid renders additional empty rows to fill in the final page of data when used with a `Paginator` component. In .NET 9 or later, empty data cells (`<td></td>`) are added to the empty rows. The empty rows are intended to facilitate rendering the QuickGrid with stable row height and styling across all pages. You can apply styles to the rows using [CSS isolation](xref:blazor/components/css-isolation) by wrapping the `QuickGrid` component in a wrapper element, such as a `<div>`, and applying a row style with `::deep`[pseudo-elements](https://developer.mozilla.org/docs/Web/CSS/Pseudo-elements):
141
+
QuickGrid renders additional empty rows to fill in the final page of data when used with a `Paginator` component. In .NET 9 or later, empty data cells (`<td></td>`) are added to the empty rows. The empty rows are intended to facilitate rendering the QuickGrid with stable row height and styling across all pages.
142
+
143
+
## Apply row styles
144
+
145
+
Apply styles to rows using [CSS isolation](xref:blazor/components/css-isolation), which can include styling empty rows for `QuickGrid` components that [page data with a `Paginator` component](#page-items-with-a-paginator-component).
146
+
147
+
Wrap the `QuickGrid` component in a wrapper block element, for example a `<div>`:
148
+
149
+
```diff
150
+
+ <div>
151
+
<QuickGrid ...>
152
+
...
153
+
</QuickGrid>
154
+
+ </div>
155
+
```
156
+
157
+
Apply a row style with the `::deep`[pseudo-element](https://developer.mozilla.org/docs/Web/CSS/Pseudo-elements). In the following example, row height is set to `2em`, including for empty data rows.
158
+
159
+
`{COMPONENT}.razor.css`:
142
160
143
161
```css
144
162
::deep tr {
145
163
height: 2em;
146
164
}
147
165
```
148
166
149
-
To hide the empty row data cells rendered by the QuickGrid, use CSS styling. In the following isolated CSS styles:
167
+
Alternatively, use the following CSS styling approach:
150
168
151
-
*Row cells populated with data are displayed.
152
-
*Empty row data cells aren't displayed, which avoids empty row cell borders from rendering per Bootstrap styling.
169
+
*Display row cells populated with data.
170
+
*Don't display empty row cells, which avoids empty row cell borders from rendering per Bootstrap styling.
Copy file name to clipboardExpand all lines: aspnetcore/blazor/file-uploads.md
+5-11Lines changed: 5 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -259,15 +259,15 @@ public class UploadResult
259
259
260
260
A security best practice for production apps is to avoid sending error messages to clients that might reveal sensitive information about an app, server, or network. Providing detailed error messages can aid a malicious user in devising attacks on an app, server, or network. The example code in this section only sends back an error code number (`int`) for display by the component client-side if a server-side error occurs. If a user requires assistance with a file upload, they provide the error code to support personnel for support ticket resolution without ever knowing the exact cause of the error.
261
261
262
-
<!-- UPDATE 9.0 HOLD moniker range="< aspnetcore-9.0" -->
262
+
<!-- UPDATE 10.0 HOLD moniker range="< aspnetcore-9.0" Tracking PU bug: https://github.com/dotnet/aspnetcore/issues/47301-->
263
263
264
264
The following `LazyBrowserFileStream` class defines a custom stream type that lazily calls <xref:Microsoft.AspNetCore.Components.Forms.IBrowserFile.OpenReadStream%2A> just before the first bytes of the stream are requested. The stream isn't transmitted from the browser to the server until reading the stream begins in .NET.
265
265
266
266
`LazyBrowserFileStream.cs`:
267
267
268
-
<!-- UPDATE 9.0 HOLD moniker-end -->
268
+
<!-- UPDATE 10.0 HOLD moniker-end -->
269
269
270
-
<!-- UPDATE 9.0 HOLD for next line: < aspnetcore-9.0 -->
270
+
<!-- UPDATE 10.0 HOLD for next line: < aspnetcore-9.0 -->
271
271
272
272
:::moniker range=">= aspnetcore-8.0"
273
273
@@ -332,7 +332,7 @@ The following `FileUpload2` component:
332
332
333
333
:::moniker-end
334
334
335
-
<!-- UPDATE 9.0 HOLD for the next line: < aspnetcore-9.0 -->
335
+
<!-- UPDATE 10.0 HOLD for the next line: < aspnetcore-9.0 -->
336
336
337
337
:::moniker range=">= aspnetcore-8.0"
338
338
@@ -909,10 +909,6 @@ For more information on SignalR configuration and how to set <xref:Microsoft.Asp
909
909
910
910
## Maximum parallel invocations per client hub setting
911
911
912
-
<!-- UPDATE 9.0 Check on a fix for this per
913
-
https://github.com/dotnet/aspnetcore/issues/53951
914
-
and version if fixed. -->
915
-
916
912
Blazor relies on <xref:Microsoft.AspNetCore.SignalR.HubOptions.MaximumParallelInvocationsPerClient%2A> set to 1, which is the default value.
917
913
918
914
Increasing the value leads to a high probability that `CopyTo` operations throw `System.InvalidOperationException: 'Reading is not allowed after reader was completed.'`. For more information, see [MaximumParallelInvocationsPerClient > 1 breaks file upload in Blazor Server mode (`dotnet/aspnetcore`#53951)](https://github.com/dotnet/aspnetcore/issues/53951).
@@ -925,13 +921,11 @@ The line that calls <xref:Microsoft.AspNetCore.Components.Forms.IBrowserFile.Ope
925
921
926
922
Possible causes:
927
923
928
-
<!-- UPDATE 9.0 HOLD: in versions of ASP.NET Core earlier than 9.0 -->
929
-
930
924
* Using the [Autofac Inversion of Control (IoC) container](https://autofac.org/) instead of the built-in ASP.NET Core dependency injection container. To resolve the issue, set <xref:Microsoft.AspNetCore.SignalR.HubOptions.DisableImplicitFromServicesParameters%2A> to `true` in the [server-side circuit handler hub options](xref:blazor/fundamentals/signalr#server-side-circuit-handler-options). For more information, see [FileUpload: Did not receive any data in the allotted time (`dotnet/aspnetcore`#38842)](https://github.com/dotnet/aspnetcore/issues/38842#issuecomment-1342540950).
931
925
932
926
* Not reading the stream to completion. This isn't a framework issue. Trap the exception and investigate it further in your local environment/network.
933
927
934
-
<!-- UPDATE 9.0 HOLD in versions of ASP.NET Core earlier than 9.0
928
+
<!-- UPDATE 10.0 HOLD in versions of ASP.NET Core earlier than 9.0
935
929
adopt ***either*** of the following approaches: * Upgrade the app to ASP.NET Core 9.0 or later.
936
930
with the article version selector set to "ASP.NET Core in .NET 8" or earlier -->
Copy file name to clipboardExpand all lines: aspnetcore/blazor/host-and-deploy/server.md
+1-6Lines changed: 1 addition & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,12 +95,7 @@ The service isn't required for Blazor apps hosted in Azure App Service or Azure
95
95
96
96
:::moniker range=">= aspnetcore-8.0"
97
97
98
-
<!-- UPDATE 9.0 Update section to only cross-link stateful
99
-
reconnect guidance after the feature is
100
-
supported with Azure SignalR Service. -->
101
-
102
-
> [!NOTE]
103
-
> [Stateful reconnect](xref:signalr/configuration#configure-stateful-reconnect) (<xref:Microsoft.AspNetCore.SignalR.Client.HubConnectionBuilderHttpExtensions.WithStatefulReconnect%2A>) was released with .NET 8 but isn't currently supported for the Azure SignalR Service. For more information, see [Stateful Reconnect Support? (`Azure/azure-signalr`#1878)](https://github.com/Azure/azure-signalr/issues/1878).
98
+
The Azure SignalR Service with SDK [v1.26.1](https://github.com/Azure/azure-signalr/releases/tag/v1.26.1) or later supports [SignalR stateful reconnect](xref:signalr/configuration#configure-stateful-reconnect) (<xref:Microsoft.AspNetCore.SignalR.Client.HubConnectionBuilderHttpExtensions.WithStatefulReconnect%2A>).
Copy file name to clipboardExpand all lines: aspnetcore/blazor/hybrid/class-libraries.md
+5-10Lines changed: 5 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,25 +48,20 @@ For more information, see the following articles:
48
48
49
49
:::moniker-end
50
50
51
-
<!-- UPDATE 9.0 Ask Beth on a replacement for this
52
-
53
51
## Sample app
54
52
55
-
For an example of the scenarios described in this article, see the .NET Podcasts sample app:
53
+
For an example of the scenarios described in this article, see the [eShop Reference Application (AdventureWorks) (`dotnet/eShop` GitHub repository)](https://github.com/dotnet/eShop). The .NET MAUI Blazor Hybrid app is in the `src/HybridApp` folder.
For a version of the sample app tailored for Azure hosting, see the [`Azure-Samples/eShopOnAzure` GitHub repository](https://github.com/Azure-Samples/eShopOnAzure).
59
56
60
-
The .NET Podcasts app showcases the following technologies:
57
+
The sample app showcases the following technologies:
Copy file name to clipboardExpand all lines: aspnetcore/blazor/performance.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,7 +195,7 @@ public static RenderFragment SayHello = @<h1>Hello!</h1>;
195
195
}
196
196
```
197
197
198
-
The preceding approach reuses rendering logic without per-component overhead. However, the approach doesn't permit refreshing the subtree of the UI independently, nor does it have the ability to skip rendering the subtree of the UI when its parent renders because there's no component boundary. Assignment to a <xref:Microsoft.AspNetCore.Components.RenderFragment> delegate is only supported in Razor component files (`.razor`), and [event callbacks](xref:blazor/components/event-handling#eventcallback) aren't supported.
198
+
The preceding approach reuses rendering logic without per-component overhead. However, the approach doesn't permit refreshing the subtree of the UI independently, nor does it have the ability to skip rendering the subtree of the UI when its parent renders because there's no component boundary. Assignment to a <xref:Microsoft.AspNetCore.Components.RenderFragment> delegate is only supported in Razor component files (`.razor`).
199
199
200
200
For a non-static field, method, or property that can't be referenced by a field initializer, such as `TitleTemplate` in the following example, use a property instead of a field for the <xref:Microsoft.AspNetCore.Components.RenderFragment>:
201
201
@@ -248,7 +248,7 @@ The [`CascadingValue` component](xref:blazor/components/cascading-values-and-par
248
248
249
249
Setting `IsFixed` to `true` improves performance if there are a large number of other components that receive the cascaded value. Wherever possible, set `IsFixed` to `true` on cascaded values. You can set `IsFixed` to `true` when the supplied value doesn't change over time.
250
250
251
-
Where a component passes `this` as a cascaded value, `IsFixed` can also be set to `true`:
251
+
Where a component passes `this` as a cascaded value, `IsFixed` can also be set to `true`, because `this` never changes during the component's lifecycle:
Copy file name to clipboardExpand all lines: aspnetcore/blazor/security/blazor-web-app-with-oidc.md
-5Lines changed: 0 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -731,11 +731,6 @@ At this point, Razor components can adopt [role-based and policy-based authoriza
731
731
732
732
Use the guidance in this section to implement application roles, ME-ID security groups, and ME-ID built-in administrator roles for apps using [Microsoft Entra ID (ME-ID)](https://www.microsoft.com/security/business/microsoft-entra).
733
733
734
-
<!-- UPDATE 9.0 If we end up with a BWA + MS Identity Web article
735
-
and sample, this section will be removed in favor
736
-
of coverage of using Graph for groups/roles in the
737
-
new article. -->
738
-
739
734
The approach described in this section configures ME-ID to send groups and roles in the authentication cookie header. When users are only a member of a few security groups and roles, the following approach should work for most hosting platforms without running into a problem where headers are too long, for example with IIS hosting that has a default header length limit of 16 KB (`MaxRequestBytes`). If header length is a problem due to high group or role membership, we recommend not following the guidance in this section in favor of implementing [Microsoft Graph](/graph/sdks/sdks-overview) to obtain a user's groups and roles from ME-ID separately, an approach that doesn't inflate the size of the authentication cookie. For more information, see [Bad Request - Request Too Long - IIS Server (`dotnet/aspnetcore`#57545)](https://github.com/dotnet/aspnetcore/issues/57545).
740
735
741
736
Configure the role claim type (<xref:Microsoft.IdentityModel.Tokens.TokenValidationParameters.RoleClaimType?displayProperty=nameWithType>) in <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions> of `Program.cs`. Set the value to `roles`:
Copy file name to clipboardExpand all lines: aspnetcore/blazor/security/index.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -283,10 +283,6 @@ For a description on how global interactive render modes are applied to non-Iden
283
283
284
284
For more information on persisting prerendered state, see <xref:blazor/components/prerender#persist-prerendered-state>.
285
285
286
-
<!-- UPDATE 9.0 Remove blog post cross-link -->
287
-
288
-
For more information on the Blazor Identity UI and guidance on integrating external logins through social websites, see [What's new with identity in .NET 8](https://devblogs.microsoft.com/dotnet/whats-new-with-identity-in-dotnet-8/#the-blazor-identity-ui).
Copy file name to clipboardExpand all lines: aspnetcore/blazor/test.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,7 +163,5 @@ The following actions take place at each step of the test:
163
163
164
164
## Additional resources
165
165
166
-
<!-- UPDATE 9.0 Check on staleness of Oslo talk link -->
167
-
168
166
*[Getting Started with bUnit](https://bunit.dev/docs/getting-started/): bUnit instructions include guidance on creating a test project, referencing testing framework packages, and building and running tests.
169
-
*[How to create maintainable and testable Blazor components - Egil Hansen - NDC Oslo 2022](https://www.youtube.com/watch?v=L_n-12FglLI)
167
+
*[Blazor Testing from A to Z - Egil Hansen - Swetugg Stockholm 2024](https://youtu.be/GU_XbWjrP_g?si=1SrjeaP1T9LdFegN) ([Swetugg](https://www.swetugg.se/sthlm-2025))
0 commit comments