How to create a MVC 2 Project in VS2010?

Welcome to CodeSpread! How to create a MVC 2 Project in VS2010? 1. Open VS2010. 2. Select File -> New Project. 3. Select Visual C# -> Web -> ASP.NET MVC 2 Empty Web Application. Name it as MyMvcApplication. Click ‘OK’. 4. To Add a controller, right click Controllers. Select Add -> Controller 5. Name the controller as ‘HomeController’. Click ‘Add’. 6. The controller page will look like shown below. 7. To Add the Index, right click on anywhere on the Index() method. Click ‘Add View’. 8. The below screen will be shown. Unselect ‘Select master page’ and click on ‘Add’. 9. The Index view will be added and will be shown as below. 10. Type the text “Hello! This is My MVC Application.” within the tags. 11. Press ‘F5’ to run the application. The browser will open as in screen...

Read More