James123
James123

Reputation: 11672

Change header/footer in MVC4?

I am new to MVC4 and I am jumping directly from ASP.net 2.0? Just started learning "Music Store" Application (Razor). One thing I am always confusing is Theme header/footer. How to change them to my company custom header.

We have separate header in LAMP server (which is is PHP page) I have to that header in by calling with url like "MyCompany.com}/inc/custom/typical_header_tall/".

Please someone explain me this. Is there any good book or article on MVC4 themes.

Upvotes: 0

Views: 4985

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1039498

You may take a look at the ~/Views/Shared/_Layout.cshtml file which is where those sections are defined. By default when you create a new ASP.NET MVC application using some of the built-in templates in Visual Studio all views inherit from this layout file (because there's a ~/Views/_ViewStart.cshtml file specifying the common layout).

You may read more about layouts and Razor templates in this blog post from Scott Gu. They are the equivalent of content forms and master pages in the WebForms world.

Upvotes: 3

Related Questions