Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Adding a server side page to a Blazor project

$
0
0

I'm trying to add a new page to a Blazor project.

So I add the new .razor file in the Components/Pages folder of the server side project and add a @page directive to the top of it.

@page "/OtherPage"<h3>OtherPage</h3>@code {}<p>This is the other page.</p>

When I navigate to /OtherPage the page appears but then disappears and says Not found.

What is wrong?

Try again...

In VisualStudio create a new Blazor project.

In the server side project create a new page.

When you run the project and try to navigate to the new page it shows briefly and then changes to Not found.

enter image description here


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>