Posts

Showing posts with the label MVC

ASP.NET MVC 5 From Scratch : Create an ASP.NET MVC 5 Empty Project

Image
A lot of people think that you can only create one kind of ASP.NET MVC 5 project, the one with the sample application.  But the reality is that you can create an Empty ASP.NET MVC 5, you just need to do more work.  However, it is cleaner and you can add what you need, instead of having everything in place already like the default template.  So you might run into more errors with the empty project, but I think you will learn more about MVC than if you just have the default template.  Plus it's more streamline.  I always start with an empty project on my MVC projects.  In order to follow this tutorial you must have Visual Studio 2013 installed. Step-By-Step Instructions: Create a new project in Visual Studio call "MvcApp", by clicking on File → New → Project Select Visual C# → Web → ASP.NET Web Application, in the "Name:" field type the name "MvcApp", then click "OK"    3.  On the next screen select "Empty" on the "Select a templ...

ASP.NET MVC : Upgrade ASP.NET MVC 4 to ASP.NET MVC 5 Using NuGet Part 1

Image
In this blog we will go over how to upgrade your existing project which uses ASP.NET MVC 4 to ASP.NET MVC 5 using NuGet.  During the upgrade you will encounter some errors but they are easy enough to fix by changing the Web.Config file.  In the first blog we will create a simple ASP.NET MVC 4 application from scratch. But first thing is first let's begin by creating a project in ASP.NET MVC 4: Create a blank solution in Visual Studio call "MVCProjects" 2.  Now add a new project to the "MVCProjects" by selecting ASP.NET MVC4, call it "MyMVC4". Make sure you select Visual C# → Web → Visual Studio 2012 → ASP.NET MVC 4 Web Application, then click "OK" 3. Select the "Empty" template, and "Razor" as the "View Engine", then click "OK" 4. Right click on the "Controller" and select "Add" → "Controller" 5.  On the "Add Controller" screen type "HomeController" on t...

ASP.NET MVC : Upgrade ASP.NET MVC 4 to ASP.NET MVC 5 Using NuGet Part 2

Image
In the previous blog  we went over how to create a simple ASP.NET MVC 4 application.  In this blog we will go over the steps to upgrade our ASP.NET MVC 4 application to ASP.NET MVC 5 application. Step-By-Step Instructions: Open the "MyMVC4" project that you've created on the last blog Right click on the project and select "Manage NuGet Packages..." 3.  Select Microsoft ASP.NET MVC and click "Install", as you can see the latest version is 5.2.3 4.  Click "I Accept" on the license agreement screen 5.  There will be a check mark after ASP.NET MVC 5 has been installed by NuGet 6.  Before you click the "Close" button make a note of the "Description" section, pay close attention to the "Dependencies" section, it will come in handy later. 7.  Visual Studio will give you a message that to complete the upgrade you have to restart Visual Studio.  Click "OK" 8.  Close Visual Studio and then open the "MyMVC4...