Layouts, Tag Helpers, and Views in Razor

  • 26 Videos | 1h 28m 18s
  • Earns a Badge
ASP.NET Core MVC utilizes the Razor view engine to create view templates, and the new version provides exciting new features to create a better development experience. In this course, you will embark on an in-depth exploration of the Razor View Engine and the new features introduced in ASP.NET Core. You’ll start by discovering the basics of Razor templating and utilizing layouts to provide a consistent look and feel for your application. Then you’ll explore built-in and custom Tag Helpers to help componentize your templates. Finally, you’ll learn about view components that improve upon existing features in Razor to provide components that can contain their own business logic. This course was originally created by Global Knowledge (GK). 

WHAT YOU WILL LEARN

  • describe the purpose of inline statements and code blocks and how to manipulate them in Razor
    discuss how to add comments to Razor templates
    describe the ViewBag and how it can be used to pass data from a controller to a view
    discuss how to combine markup and code using code blocks
    describe how layouts can be used to provide a consistent look and feel for applications
    discuss the render body function and how to specify and provide content for layout sections
    describe how to specify a layout file for Razor templates
    discuss the purpose of _ViewStart files and how they can be used to specify different layouts for different parts of an application
    describe how data can be passed between a view and its layout using the ViewBag and ViewData properties
    discuss how to achieve layout inheritance by chaining layout files
    describe how to specify strongly typed views using the model directive
    discuss tag helpers and how they are used to generate HTML code
    describe how to enable Tag Helper intellisense in Visual Studio 2017
  • discuss how to use Tag Helpers to build HTML forms
    describe View Dependency Injection and how it can be used to inject types into views and call functions on the types
    discuss how to use Dependency Injection to load lookup data
    discuss Bootstrap CSS and how custom tag helpers can be used to create reusable code
    describe custom elements and attributes and how they're used when creating custom tag helpers
    demonstrate how to create a basic tag helper
    demonstrate how to create a custom element tag helper
    describe how to avoid naming conflicts by using a prefix on custom tag helpers
    discuss the limitations of using partial views to create reusable HTML for applications
    describe why view components are useful in overcoming the disadvantages of partial views
    discuss how view components can be invoked as tag helpers
    describe how to pass parameters into view components
    discuss how to create a view component and componentize an application

IN THIS COURSE

  • Playable
    1. 
    Inline Statements and Code Blocks
    5m 11s
    UP NEXT
  • Playable
    2. 
    Documenting Templates with Comments
    56s
  • Locked
    3. 
    Using the ViewBag to Pass Data to a Template
    1m 16s
  • Locked
    4. 
    Combining Markup and Code with Code Blocks
    10m 32s
  • Locked
    5. 
    Introducing Layouts
    57s
  • Locked
    6. 
    Specifying and Providing Content
    2m 52s
  • Locked
    7. 
    Specifying a Layout File
    2m 2s
  • Locked
    8. 
    The Purpose of _ViewStart Files
    1m 31s
  • Locked
    9. 
    Sharing Data with a Layout
    2m 3s
  • Locked
    10. 
    Layout Inheritance
    5m 59s
  • Locked
    11. 
    Strongly Typed Views
    2m 15s
  • Locked
    12. 
    What is a Tag Helper?
    3m 57s
  • Locked
    13. 
    Enabling Tag Helper Intellisense
    2m 8s
  • Locked
    14. 
    Using Tag Helpers to Build Forms
    12m 36s
  • Locked
    15. 
    Dependency Injection in a View
    2m 56s
  • Locked
    16. 
    Using Dependency Injection to Load Lookup Data
    2m 42s
  • Locked
    17. 
    Custom Tag Helpers
    52s
  • Locked
    18. 
    Custom Elements and Attributes
    3m 54s
  • Locked
    19. 
    Creating a Tag Helper
    6m 49s
  • Locked
    20. 
    Creating a Custom Element Tag Helper
    5m 59s
  • Locked
    21. 
    Using Prefixes to Avoid Naming Conflicts
    47s
  • Locked
    22. 
    The Limitations of Partial Views
    1m 4s
  • Locked
    23. 
    View Components
    47s
  • Locked
    24. 
    Invoking a View Component as a Tag Helper
    1m 37s
  • Locked
    25. 
    Passing Data to View Components
    1m 24s
  • Locked
    26. 
    Creating a View Component
    5m 14s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE