Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude layout?

My ASP.NET Core web project has the usual shared layout file.

How do I exclude the use of layout for a specific page?

like image 721
Old Geezer Avatar asked Sep 06 '25 03:09

Old Geezer


1 Answers

@{
  Layout = null;
}

Stick that at the top of your view to not use any layout. Bear in mind you'll need to specify a full HTML document body in that view.

like image 148
Daniel Avatar answered Sep 07 '25 19:09

Daniel