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:

  1. In Visual Studio, navigate to the Areas » BugTracker » Views » Shared folder, create a new file with the cshtml extension.
    Name the class BugTrackerLayout.
  2. Add using statements to the following namespace: Telerik.Web.Mvc.UI.
  3. Define the main HTML structure by adding the html, head, and body tags.
  4. 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:
  5. Define the HTML for the layout view.
  6. 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.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?