I'm just starting to use Blazor. I'm using Net 8 In Visual Studio 2022
This is my App.razor file
<Router AppAssembly="@typeof(App).Assembly"><Found Context="routeData"><RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /><FocusOnNavigate RouteData="@routeData" Selector="h1" /></Found><NotFound><PageTitle>Not found</PageTitle><LayoutView Layout="@typeof(MainLayout)"><p role="alert">Sorry, there's nothing at this address.</p></LayoutView></NotFound></Router>The directory structure is the default
--Features -->Home --> HomePage.razor --> TestPage.razorMy HomePage is the main page.
@page "/"My TestPage.razor has this
@page "/Test"<PageTitle>TEST</PageTitle><h3>TEST results</h3>When I run the App. its open in HomePage it the URL
https://localhost:7258/But when I want to redirect to TestPage I change the URL to
https://localhost:7258/TestBut it appears the message
Sorry, there's nothing at this address.I checked .csproj file as says here
Adding
<ItemGroup><Folder Include="Features\Home\" /></ItemGroup>But nothing has changed..
What I am missing?
Thanks