Developer technologies | ASP.NET | ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
In my ASP.NET Core Project, _Layout file I make into 2 files
It is made this way so
Is this the best practice ? If have better way, please shere
Please help
Your approach is perfectly fine.
The other option is to set a default layout in the viewstart and then override the Layout in those pages where you want to use the other layout
@{
Layout = "_Layout";
}
Refer: https://www.learnrazorpages.com/razor-pages/files/layout