Build ASP.NET applications without an MVC framework. Learn how to use Razor Pages to build dynamically rendered pages and secure, interactive forms for your apps.
Overview
Syllabus
Introduction
- Welcome
- What you should know
- Using the exercise files
- What is Razor Pages?
- Development environment setup
- Exploring the sample application
- Creating a new Razor Pages application
- Creating Razor Pages
- Serving static content
- Using the Razor syntax to render dynamic content
- Adding code blocks to a Razor page
- Passing parameters in the URL
- Reusing shared markup with layouts
- Using sections in Razor layouts
- Sharing data between layouts and views
- Executing code before every page
- Using loose coupling for maintainability
- Using a page model to keep logic out of the view
- Increasing maintainability with dependency injection
- Building a form with tag helpers
- Handling HTTP verbs with custom logic
- Automatically populating objects with request data
- Adding custom handlers beyond GET and POST
- Challenge: Process an uploaded image file
- Solution: Process an uploaded image file
- Validating form post data
- Displaying validation errors
- Securing your pages from unauthorized access
- Implementing basic cookie-based authentication
- Next steps
Taught by
Jess Chadwick