Razor is a markup syntax that allows you to embed server-based code (Visual Basic and C#) into web pages.
Server-based code creates dynamic content when web pages are written to the browser. When a web page loads, the server executes the server-based code within the page before returning the page to the browser. Because it runs on the server, this code can perform complex tasks, such as accessing a database.
Razor is based on ASP.NET, which is designed for the creation of web applications. It has the power of traditional ASP.NET markup, but is easier to use and easier to learn.
You can build your own helper using Razor syntax, or use the built-in ASP.NET helper.