WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

ASP.NET MVC - Views


To learn ASP.NET MVC, we are Building an Internet Application.

Part V: Adding Views for Displaying the Application.


The Views Folder

The Views envelope stores the records (HTML documents) identified with the showcase of the application (the UIs). These documents may have the augmentations html, asp, aspx, cshtml, and vbhtml, contingent upon the language content.

The Views envelope contains one organizer for each controller. 

Visual Web Developer has made an Account envelope, a Home organizer, and a Shared envelope (inside the Views folder).

The Account envelope contains pages for enrolling and signing in to client accounts.

The Home organizer is utilized for putting away application pages like the landing page and the about page.

The Shared organizer is utilized to store sees shared between controllers (ace pages and format pages).


ASP.NET File Types

The following HTML document types can be found in the Views Folder:

File TypeExtention
Plain HTML.htm or .html
Classic ASP.asp
Classic ASP.NET.aspx
ASP.NET Razor C#.cshtml
ASP.NET Razor VB.vbhtml

The Index File

The document Index.cshtml speaks to the Home page of the application. It is the application's default document (file file).

Put the accompanying substance in the file:

@{ViewBag.Title = "Home Page";}

<h1>Welcome to welookups</h1>

<p>Put Home Page content here</p>

The About File

The record About.cshtml speak to the About page of the application.

Put the accompanying substance in the file:

@{ViewBag.Title = "About Us";}

<h1>About Us</h1>

<p>Put About Us content here</p>

Run the Application

Select Debug, Start Debugging (or F5) from the Visual Web Developer menu.

Your application will look like this:


Click on the "Home" tab and the "About" tab to perceive how it works.


Congratulations

Congratulations. You have made your first MVC Application.

Note: You can't tap on the "Movies" tab yet. We will include code for the "Movies" tab in the following parts of this tutorial.