Our latest


Announcements, Blogs, Releases and much much more...

  • Read our latest news and announcements, hot off the press.

Announcements






Category Blazor FAQ

Published on 12-May-2021

What is the difference between Blazor vs. Razor?
What is the difference between Blazor vs. Razor?
What is the difference between Blazor vs. Razor?

Razor is a popular template markup syntax for .NET. Blazor (Browser + Razor) is a .NET based web framework which can run on the client using WebAssembly or running on the server via SignalR.

Razor is a popular template markup syntax for .NET. Blazor (Browser + Razor) is a .NET based web framework which can run on the client using WebAssembly or running on the server via SignalR.

To give an example, Razor is the syntax you use when creating web apps with ASP.NET, which you’ve probably seen before:

<h1>
    Hello @Model.FirstName
</h1> 

Razor takes care of rendering your HTML based on the data in your model, while also supporting various conditionals and loops.

On the other hand, Blazor is a technology similar to ASP.NET Core & ASP.NET MVC in that:

  • It powers web applications
  • It uses Razor as its template syntax for the creation of UI.

A common point of misconception is that Blazor uses Razor. This further exacerbated by two other similar terms – Blazor components and Razor components. Those are widely used interchangeably but the correct terminology is Razor Component. A component is the combination of markup (written in HTML) and logic (in C#) in a single Razor file (with the .cshtml extension).

Created on 12-May-2021 Last updated 23-May-2021

Assigned Tag
  • Blazor
  • FAQ