Skip to Main Content
C# 10.0 All-in-One For Dummies
book

C# 10.0 All-in-One For Dummies

by John Paul Mueller
March 2022
Intermediate to advanced content levelIntermediate to advanced
864 pages
19h 46m
English
For Dummies
Content preview from C# 10.0 All-in-One For Dummies

Chapter 2

Employing the Razor Markup Language

IN THIS CHAPTER

Bullet Understanding how Razor fits into the picture

Bullet Working with variables in Razor

Bullet Making decisions using Razor

Bullet Storing and cycling through data

As mentioned in Chapter 1 of this minibook, Razor is Microsoft’s language for implementing dynamic web content. While Chapter 1 shows how to create static content, most websites today use dynamic content so that updating them is easier. Using Razor is sort of like mixing C#, HTML, and some older technologies reminiscent of Active Server Pages (ASP) (https://docs.microsoft.com/en-us/troubleshoot/iis/asp-support-windows). The first part of this chapter discusses how this mix occurs and shows you some basics.

As with C#, any discussion of Razor needs to begin with using variables to store data. This means understanding the Razor data types, how to work with operators, and how to convert one data type to another. The information you obtained in Book 1, “The Basics of C# Sharp Programming,” and especially in Chapters 2 through 4, will help you in this minibook.

The next three parts of ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# Cookbook

C# Cookbook

Joe Mayo
Head First C#, 4th Edition

Head First C#, 4th Edition

Andrew Stellman, Jennifer Greene

Publisher Resources

ISBN: 9781119839071Purchase Link