.NET Development
Blazor error Sorry, there's nothing at this address.
I have created a Blazor Webassembly in VS 2022 .net 7, using the default template, I will be using it to do some testing. However, I'm running into an issue, I create a simple Component Page \Pages\DialogTestPage.razor and the code looks like this
Code for DialogTestPage.razor
@page "/dialogtestpage"
<PageTitle>Alert</PageTitle>
<h3>Dialog Test Page</h3>
@code {
}
Navmenu.rezor code
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="">BlazorWAModalDialog</a>
<button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
<div class="@NavMenuCssClass nav-scrollable" @onclick="ToggleNavMenu">
<nav class="flex-column">
<div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="oi oi-home" aria-hidden="true"></span> Home
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="counter">
<span class="oi oi-plus" aria-hidden="true"></span> Counter
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="fetchdata">
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
</NavLink>
</div>
<div class="nav-item px-10">
<NavLink class="nav-link" href="dialogtestpage">
<span class="oi oi-list-rich" aria-hidden="true"></span> Modal Dialog Boot Strap
</NavLink>
</div>
</nav>
</div>
@code {
private bool collapseNavMenu = true;
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
private void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
}
When I select the option Modal Dialog Boot Strap, I get the following results.
Here is what I have try to fix this issue.
- Clean the solution
- Rebuild solution
- check routing in the App.razor
- Uninstalled VS 2022 and reinstalled. (Version 17.5.4 running on windows 10 and 11)
- Tryed using one of my other computers, with the same result
Recompile?
+++ Rick ---
Hi Rick, thank you for your response. I did a Recompile (by doing a rebuild, still have the same issue)
Have a nice Weekend