Latest web development tutorials

ASP.NET Razor mark

Razor is not a programming language. It is a markup language server.

What's Razor?

Razor is a markup syntax that allows you to server-based codes (Visual Basic and C #) embedded in Web pages.

Server-based code when transferring to the web browser to create dynamic Web content. When a page is requested, the server before returning the page to the browser first page server-based code execution. By running the server, the code can perform complex tasks, such as access to the database.

Razor is ASP.NET-based, for creating Web applications and design. It has a traditional ASP.NET features, but is easier to use and easier to learn.

Razor Syntax

Razor uses classic ASP and PHP and similar syntax.


@for (int i = 0; i < 10; i++) {


for ($i = 0; $i < 10; $i++) {

Web Forms (classic ASP):

<% for (int i = 0; i < 10; i++) { %>
<li><% =i %></li>
<% } %>

Razor Helper

ASP.NET help is a component of a few lines of simple code to access Razor.

You can build your own using the Razor syntax help, or use the built-in ASP.NET Helper.

The following is a brief description of some useful Razor helpers:

  • Web Grid (Web Grid)
  • Web Graphics (Web Graphics)
  • Google Analytics (Google analysis)
  • Facebook Integration (Facebook Integration)
  • Twitter Integration (Twitter integration)
  • Sending Email (email)
  • Validation (verification)

Razor programming language

Razor support C # (C sharp) and VB (Visual Basic).