Search code examples
asp.net-coreblazordirective

Can the same @page directive be used on more than 1 'page' in Blazor?


So a blazor page (Razor component) has @page "/mypage" at the top. Can I have it so more than one 'page' have the same directive? It doesn't seem so but thought I would ask to be sure.


Solution

  • No. You can't. The server will throw an exception complaining that there are multiple razor components with the same address.