How to Create a View in ASP.NET MVC ?

Published on February 18, 2013 by Senthil Kumar

Filed under ASP.NET

Last modified February 18, 2013

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 9188 times

Every Web Applications needs to have the UI through which the user can interact with . You can easily create a View in ASP.NET MVC by following the below steps.

How to Create a View in ASP.NET MVC ?

1. Right Click on the Action Method in the Controller and click “Add View” in the context menu.

How to Create a View in ASP.NET MVC ?

How to Create a View in ASP.NET MVC ?

2. In the Add View Dialog , give a name for the View and select the View Engine that you wish to use for the current View from the View engine dropdown list. You can also select the layout or the master page for the View. If the view is a strongly typed view , you could select the Model Class and Scaffold template by checking the “Create a a strongly-typed view” and click “Add” button.

How to Create a View in ASP.NET MVC ?

How to Create a View in ASP.NET MVC ?

3. A new file with the specified name will now be added to the Views folder . You can start entering the markup for the UI in the view now .

Sample View


ViewBag.Title = "Index";



@Html.Label(" - a Programming Directory")

1 Comment

  1. Interesting .NET Links – February 19 , 2013 | TechBlog
    June 21, 2014 - 9:26 pm

Leave a Comment


You might be Interested in these Posts

How to set default value for Html.TextBoxFor in ASP.NET MVC ?

You can set the default value for the Html.TextBoxFor extension controls in ASP.NET MVC by specifyin...

ASP.NET MVC and View State

The ASP.NET Web Forms includes the Server Controls which generally retains the state of the controls...

3 New C# 8 Features We Are Excited About

C# is rapidly approaching its third decade of life. Originally released in 2000, the language has gr...