[8.0.100-preview.4.23211.1] Page doesn't show passed content when using NavigationManager.NavigateTo() #47683
Closed
1 task done
Labels
area-blazor
Includes: Blazor, Razor Components
Is there an existing issue for this?
Describe the bug
In dotnet-sdk-8.0.100-preview.4.23211.1, when using NavigationManager.NavigateTo() method to navigate to a page with parameter, the content from parameter doesn't appear on navigated page.
Expected Behavior
It navigates to "https://localhost:7016/counter/test" and the @data1 content appear on the page.
Steps To Reproduce
Repro steps:
1.Create a default Blazor Server app with Visual Studio.
2. Add following code on Counter.razor page.
Actual Result:
It navigates to "https://localhost:7016/counter/test" but the @data1 content doesn't show on the page.
Exceptions (if any)
No response
.NET Version
8.0.100-preview.4.23211.1
Anything else?
Findings
When adding a breaking point on line of "if (!string.IsNullOrEmpty(param1))" to debug the demo: In 8.0.100-preview.4.23211.1, when clicking the "test link", the breaking point won't be hit. It seems the page OnInitialized method doesn't be triggered. In previous version, when clicking the "test link", the breaking point will be hit.
The symptom is similar with bug [8.0.100-preview.4.23211.1] Anchor tag behavior changed when setting herf="#" in blazor app #47682
@dotnet-actwx-bot @dotnet/compat
The text was updated successfully, but these errors were encountered: