Click here to Skip to main content
15,742,609 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hello EveryOne!
guys!i am stuck in problem..(i want to add my Own MasterPage in Mvc4 which is shows all my(index,contact us,about us etc) pages..).
i have worked in Web Form MasterPage.
Here in mvc4,i am confused with the concept of {-Layout.cshtml and Masterpage}.
Can any one Explain or any good link.
[no name] 4-May-14 0:38am    
Have you chosen the Empty template, while creating your project? That gives you a chance to create a layout of your own. Else if you use the Internet template then you get a shared folder with a layout.cshtml(if Razor)/layout.aspx(if aspx) inside it. You can manipulate there itself.
Mohsin Azam 5-May-14 14:58pm    
No,i choose internet application...
[no name] 14-May-14 6:19am    
if ou choose internet application, VS gives default layout page. Try using Empty template, so that you can manipulate and your own design stuffs. Please hit reply as I donot get any notification if you give a response.

1 solution

Please read below great articles for more info. :)

ASP.NET MVC Layouts with Razor

Creating Page Layouts with View Master Pages
Share this answer
Mohsin Azam 5-May-14 14:58pm    
Sampath Lokuge 6-May-14 2:08am    
You're warmly welcome.If you feel this is the answer,Please accept it.It'll help for others in future.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900