This repository has been archived by the owner on May 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Lesson 10 (Razor Views)
Sally Steuterman edited this page Jul 28, 2020
·
1 revision
- More about the "view" portion the MVC design pattern.
- Why using templates to design a website is a good idea.
- How to create templates using Razor.
- How to add iteration, conditionals, and forms to a template.
- How to link a template to static resources like CSS stylesheets, scripts, images, etc.
- How to render a template using ASP.NET controllers.
- Check with your course manager for any important announcements.
- Remind the students that they should be working on Assignment 3. After this class, they should be able to make significant progress with the required tasks.
- Remind the students what ASP.NET Core MVC is.
- Just like lesson 8, lesson 10 includes short videos that provide guided, live-coding practice. Remind the students that the text included before and after the clips is NOT intended as a replacement for the videos.
- Razor templates inject C# code directly into otherwise typical HTML. This may feel strange to students and require a review of the notion.
- Mention the role of
ViewBag
and how to add properties. - Touch upon
Shared/_Layout.cshtml
and Bootstrap basics. - Show some examples of how to add route links with
asp-controller
andasp-action
.
- Do your best to help students who may be stuck with any Visual Studio build issues, errors, or warnings.
- Walk around and make sure no one is struggling with forking, cloning, and opening the starter code.
- This studio is designed to be solved sequentially as the students move down the page. Trying to solve later sections before the earlier ones is an option, but this will make the overall task more difficult.
- Encourage the students to explore altering the css to improve page styling.