Razor & benefit of Razor in ASP.NET MVC

What is Razor and what is the benefit of Razor?

Razor is a syntax used in Microsoft .NET technologies to develop web pages and application that let us embed the server based code (like C# and Visual Basic) into the web pages.

Server based content help us in creating dynamic content on the fly and can perform some complex logic as well. All the server side code in Razor starts with @{ and ends with }. We can mix the html and server based code inside the Razor block and that is the beauty of the Razor markup.

No comments:

Post a Comment

How to register multiple implementations of the same interface in Asp.Net Core?

 Problem: I have services that are derived from the same interface. public interface IService { } public class ServiceA : IService { ...