Join Jess Chadwick for an in-depth discussion in this video Render dynamic content with Razor, part of Learn ASP.NET Core MVC: The Basics.
- [Instructor] Converting static HTML files to Razor files…is just the first step in creating…a dynamic web application.…It's the ability to write C# code right within Views…that makes Razor so useful,…and in this video, I'll show you the basics…of the Razor syntax.…At a glance, there's not really much to the Razor syntax.…For most scenarios, all you need to do…is type the @ character anywhere in the page,…immediately followed by the C# code…that you want to execute and render.…
For example, let's say that I want to…add a copyright to my page,…and make sure that it always emits the current year,…so that I don't have to remember to update it all the time.…I can just do this.…Notice how I get full intellisense…when I begin writing code after the @ sign.…Now when I run this page and scroll to the bottom,…I can see that Razor has evaluated that expression,…and rendered the resulting value as text…right into the page.…
That's a pretty simple example,…but the real power of Razor lies…in HTML helpers.…HTML helpers are methods provided by the ASP.NET Core,…
- Building blocks of ASP.NET Core applications
- Creating a new project
- Responding to HTTP requests
- Serving static files
- Understanding the MVC pattern
- Handling requests with controllers
- Rendering HTML with Razor
- Rendering data, view markup, and view logic
- Creating HTML forms
- Validating form data
- Reading and writing from a database with Entity Framework
- Improving the user experience
- Exposing data with a web API
- Securing your ASP.NET application
Skill Level Intermediate
1. The Basics
2. The Model-View-Controller (MVC) Pattern
Understand routing4m 24s
3. Render HTML with Views
4. Work with Data
5. Improve User Experience with Ajax and Web APIs
6. Secure Your Application
Next steps1m 42s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.