Posted By : Murugan Andezuthu Dharmaratnam
Posted On : 6 December 2014
Keywords : Asp DotNet MVC Tutorial For Beginner Introduction Part 2,Asp DotNet MVC Tutorial For Beginner,Tutorials for beginners

Asp DotNet MVC Tutorial For Beginner Introduction Part 2

Adding Views To Projects

1. Open the Microsoft visual studio.Click on view in the solution explorer at the right side of the page. We can see the views that are created by default.
.



2. First of all, we can create a view by simply right click on the ActionResult name.This is the simplest method to create the same.



3. In order to add a view , click on the 'shared' option then click on 'Add' and from that click on 'view'



4. Specify the name of the view to add and then continue by clicking on the 'Add' button.



Creation Of View In Cshtml File

1. Then we can open the view that created and add contents to display in the browser. For example , I write code for displaying the first name,last name and a submit button.



2. Here we add the created view to the HomeController and after that the view works properly.For that we use an ActionResult method.Code will speicifed in the figure.



3. Save and run the program.Then we can see the output in browser window.



Like this we can add a view to project.

Murugan Andezuthu Dharmaratnam

Murugan is a technology leader with 14 years of hands-on experience in full life cycle systems design, development, implementation, and management. In addition to systems design and development, his core competencies include cloud design and architecture, interactive web applications and websites development, mobile computing, and Healthcare Information Technology. His experience is very diverse with a broad range of technologies within multiple industry settings including private, public, and non-profit. Coupled with his technology expertise, Murugan is a well-organized, result-oriented, and a highly analytical leader with proven track record in developing and implementing very complex systems.