MVC Music Store is a great tutorial written by Jon Galloway. Using Visual Studio 2012 with MVC 4 Web Application Empty template, the following folders are note available:
- /View/Shared
- /Content/
- /Scripts
Here are solutions:
- Drag /Content folder from MVCMusicStore-Assets.zip into MvcMusicStore solution folder in Visual Studio 2012. If you just drag and drop in Windows Explorer, make sure it 'included in the project'
- Select Manage Nuget Packagse under Project menu to install jQuery. The /Scripts folders will create under MvcMusicStore folder.
- Add folder Shared to /View folder
- Right click on /View/ folder to add MVC 4 Layout page (Razor) and named it _Layout.cshtml. Copy the code in tutorial into this file. Also correct version of installed jQuery script. Here, I used jquery-2.0.0.min.js instead of jquery-1.5.1.min.js
- Right click on /View/Shared folder to add MVC 4 Layout page (Razor) and named it _ViewStart.cshtml. Added the following codes to this file:
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
No comments:
Post a Comment