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

Time:12-31

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.

CodePudding user response:

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

  • Related