How to remove MainLayout from my Sub-Page ? when I create a subpage in my project, it create with the MainLayout page, how to remove this automate call from my sub-page ? note that I'm using blazor and .net 5 !
CodePudding user response:
You can create a AnnonymousLayout razor component like this
AnnonymousLayout.razor
@inherits LayoutComponentBase
<div style="width: 100%; height: 100%;">
@Body
</div>
And you can use it in a page where you do not want main layout, like this
@page "/yourpage"
@layout AnnonymousLayout