u936293
u936293

Reputation: 16264

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?

Upvotes: 4

Views: 3322

Answers (1)

Daniel
Daniel

Reputation: 171

@{
  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.

Upvotes: 14

Related Questions