HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
In order to learn ASP.NET MVC, we will build an Internet application.
Part 3: Adding styles and uniform appearance (layout).
_Layout.cshtml File represents the application layout of each page. It is located in Views folder Shared folders.
Open the file _Layout.cshtml, to replace the contents to:
In the above code, HTML Help is used to modify the HTML output:
@ Url.Content () - URL content will be inserted here.
@ Html.ActionLink () - HTML link will be inserted here.
In a later chapter of this tutorial, you will learn more about HTML helper knowledge.
In the above code, the code is marked in red markers using Razor C #.
@ ViewBag.Title - page title will be inserted here.
@RenderBody () - Page content will be presented here.
You can in our Razor tutorial learn about Razor C # and VB (Visual Basic) of the tag.
Application style sheet is Site.css, located in Content folder.
Open the file Site.css, to replace the contents to:
Shared folder (located in the Views folder) in _ViewStart file contains the following:
This code is automatically added to all views displayed by the application.
If you delete this file, you must add this line of code to all views.
In later chapters of this tutorial, you will learn more about the view.