i am using visual studio 2013 if you don't have visual studio 2013, have upper and lower version it's doesn't matter because upper and lower little bit different for creating project.
Now follow the steps.
Step 1) Open the visual studio and select the File > New > Project.
Step 2) Select the template web the (ASP.NET MVC4 and MVC5 web application).
Step 3) Select the "Empty" Template and razor or aspx view engine. i chose aspx here to use aspx pages for the view.
Now MVC applicatio has been add to in the solution.
Step 4)Now we will add the controller to our application. then just right click on controller in the solution window then "add" > "Controller".
Step 5) Set the name for the controller and add it.
Step 6) The next step we will add the view for our controller. to do that open the HelloWorld Controller. Right click in the index action and click on "Add view".
SO Don't check the "user a layout or master page" because we do not have any master in out application. after adding the view open the source code and add your design. i will add one simple line in it, "Hello World! this is my first application".
Last Step) Open the RouteConfig file and set the default action to open.
Press F5 button and run you application on browser.
This is output your application.
To be continuous MVC Tutorials
Waiting for next MVC Article. with new application.
No comments:
Post a Comment