Versions des environnements
Network:
Windows 2008 Server
>>>Hi,
>>>I am looking at the training video (Pluralsight) on APS.NET MVC Basics (produced in 2009) the demo project. The Views folder has Home folder and Shared folder. The Home folder is clear, it has view files for each view the project needs.
>>>
>>>The Shared folder has page Site.Master which is the master page used by all views.
>>>
>>>In the current version of VS 2012, when I create a test ASP.NET MVC project, the Shared folder has file _Layout.cshtml.
>>>
>>>What is the purpose of _Layout.cshtml?
>>>
>>>And does it mean that VS 2012 does not automatically create file Site.Master (master page for the project) and I have to create it manually?
>>>
>>>TIA
>>
>>Another confusing part of VS 2012. The article by Scott Guthrie on ASP.NET MVC 3 says that when you create an empty project the layout file _Layout.cshtml is automatically created. Yet when creating a project in VS 2012 no such file is created. Even though when you create a view there is check box (checked by default) - Use a Layout or Mater Page -- Nothing is created by VS.
>
>Empty project with nothing in it was introduced in MVC 4 and VS 2012. Prior to that empty project did have some stuff in it.
So it wasn't 'empty' :-}
I tend to look at the other templates to see how they are set up and then start from scratch so that I don't end up with un-needed 'crap' in the app :-}
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement