Brian Mains
Brian Mains

Reputation: 50728

Default Layout Page in ASP.NET Razor Pages

In MVC 3 with Razor view engine, you could establish the default layout page for all of your views. I can't seem to find a feature like this in ASP.NET razor pages (asp.net web pages with Razor)... anybody know if it exists?

Thanks.

Upvotes: 0

Views: 3656

Answers (2)

Mrchief
Mrchief

Reputation: 76238

You can choose a MVC View Master page, see here for screenshots: http://www.asp.net/mvc/tutorials/creating-page-layouts-with-view-master-pages-vb

For the new ASP.Net WebPages stuff, its called _PageStart.cshtml (under ~/Shared/ folder). More info here: http://www.asp.net/webmatrix/tutorials/18-customizing-site-wide-behavior

Upvotes: 1

Cortright
Cortright

Reputation: 1174

You can use Master pages in regular ASP.NET pages to set a common layout.

Upvotes: 0

Related Questions