JoshN
JoshN

Reputation: 53

Blazor Route Not Found - How do I go to the site base?

I don't want a custom page. I just want to redirect to the index page.

<Router AppAssembly="@typeof(Program).Assembly">
    <Found Context="routeData">
        <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
    </Found>
    <NotFound>
         @* go to site base *@
    </NotFound>
</Router>

Upvotes: 2

Views: 3848

Answers (1)

JoshN
JoshN

Reputation: 53

I finally found an answer here (under the Found and NotFound Templates section): https://chrissainty.com/introduction-to-routing-in-blazor/

Upvotes: 1

Related Questions