Microsoft has introduced a new view engine called “Razor” for ASP.NET MVC as an alternative to the WebForms view engine (ASPX).
The Razor view syntax is based on the C# programming language. Instead of applying the ASP.NET .ASPX markup syntax usingblocks to indicate code blocks, the Razor view syntax starts of a code block using a @ character and does not require explicit closing of the code-block.
The Add View dialog box in ASP.NET MVC 3 or 4 lets you choose the view engine you want to work with, and the New Project dialog box lets you specify the default view engine for a project. You can choose the Web Form’s view engine (ASPX), Razor, or other open-source view engines.
If one chooses to use the Razor view engine, the file extension will be .cshtml or .vbhtml instead of .aspx or .ascx.
Do you want to know, what is Microsoft Razor view engine and how razor view syntax works? Contact us now or call 1-877-RISHABH (1-877-747-4224).