Tommy
Tommy

Reputation: 583

How to NOT use the _Layout page in a Web Pages website

I have a webmatrix based website and have a test page. I need it to NOT be a part of the _SiteLayout page. How do I do this?

my dir:

root/
--assets/
--layouts/
----_SiteLayout.cshtml
--Default.cshtml
--Test.cshtml

As you can see above, there are two web pages in root dir, Default and Test. Default uses the _SiteLayout page. So does Test. But I don't want Test.cshtml to use _SiteLayout page. Can this be done?

Upvotes: 1

Views: 61

Answers (1)

Mads Laumann
Mads Laumann

Reputation: 883

Try set the Layout to null in the top of your Test.cshtml.

@{
Layout = null;
}

Upvotes: 3

Related Questions