Bug tracker: Create the BugTrackerLayout view
The BugTrackerLayout view is used as a template for the other views in the Bug Tracker application. To create the layout view:
- In Visual Studio, navigate to the Areas » BugTracker » Views » Shared folder, create a new file with the cshtml extension.
Name the class BugTrackerLayout.
- Add using statements to the following namespace: Telerik.Web.Mvc.UI.
- Define the main HTML structure by adding the html, head, and body tags.
- Add the style sheets for the Telerik MVC extensions.
The Telerik MVC extensions make use of predefined style sheets in order to style the controls created by them. In this example, you add a link to the telerik.common.css and the telerik.windows7.css files. Adding the style sheet references in this view makes them accessible in the other views. To add a link to a style sheet, you must perform the following:
- Define the HTML for the layout view.
- Specify where the child views are rendered by calling the RenderBody method of the view.
GITHUB EXAMPLE: For more information about the content of the file, see the BugTrackerLayout.cshtml file of the downloaded sample project.