Blazor SSR - can't wrap layout Body with interactive component #50518
Labels
area-blazor
Includes: Blazor, Razor Components
✔️ Resolution: Answered
Resolved because the question asked by the original author has been answered.
question
Status: Resolved
Is there an existing issue for this?
Describe the bug
Error caused by:
-'attribute [RenderModeServer]' in layout razor
or
-'rendermode="RenderMode.Server"' on component with layout Body inside
Component.razor:
MainLayout.razor:
If you have multiple layouts in your application it would useful to make some of them interactive.
Expected Behavior
No response
Steps To Reproduce
https://github.com/konstantin-karpukhin/BlazorSSRInteractiveLayout/tree/main
Exceptions (if any)
InvalidOperationException: Cannot pass the parameter 'Body' to component 'MainLayout' with rendermode 'ServerRenderMode'. This is because the parameter is of the delegate type 'Microsoft.AspNetCore.Components.RenderFragment', which is arbitrary code and cannot be serialized.
Microsoft.AspNetCore.Components.Endpoints.SSRRenderModeBoundary.ValidateParameters(IReadOnlyDictionary<string, object> latestParameters)
.NET Version
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: