- [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,…
Author
Updated
5/3/2019Released
12/6/2016- 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
- Routing
- 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
Duration
Views
Related Courses
-
Introduction
-
Welcome1m 16s
-
What you should know2m 6s
-
What's new2m 33s
-
-
1. The Basics
-
Create a new project4m 44s
-
Respond to HTTP requests5m 32s
-
Serving static files2m 18s
-
Use custom configuration4m 21s
-
2. The Model-View-Controller (MVC) Pattern
-
Understand routing4m 24s
-
3. Render HTML with Views
-
Render HTML with Razor3m 51s
-
-
4. Work with Data
-
Validate form post data5m 55s
-
5. Creating Reusable Components
-
6. Secure Your Application
-
Conclusion
-
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.
CancelTake 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.
Share this video
Embed this video
Video: Render dynamic content with Razor