Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
ASP.NET Razor
Programming syntax for ASP.NET

Razor is an ASP.NET programming syntax used to create dynamic web pages with the C# or VB.NET programming languages. Razor was in development in June 2010 and was released for Microsoft Visual Studio 2010 in January 2011. Razor is a simple-syntax view engine and was released as part of MVC 3 and the WebMatrix tool set.

Razor became a component of AspNetWebStack and then became a part of ASP.NET Core.

We don't have any images related to ASP.NET Razor yet.
We don't have any YouTube videos related to ASP.NET Razor yet.
We don't have any PDF documents related to ASP.NET Razor yet.
We don't have any Books related to ASP.NET Razor yet.
We don't have any archived web articles related to ASP.NET Razor yet.

Design

The Razor syntax is a template markup syntax, based on the C# programming language, that enables the programmer to use an HTML construction workflow. Instead of using the ASP.NET Web Forms (.aspx) markup syntax with <%= %> symbols to indicate code blocks, Razor syntax starts code blocks with an @ character and does not require explicit closing of the code-block.

The idea behind Razor is to provide an optimized syntax for HTML generation using a code-focused templating approach, with minimal transition between HTML and code.5 The design reduces the number of characters and keystrokes, and enables a more fluid coding workflow by not requiring explicitly denoted server blocks within the HTML code.6 Other advantages that have been noted:7

See also

  • Free and open-source software portal
Wikibooks has a book on the topic of: .NET Development Foundation

References

  1. "ScottGu's Blog - Introducing "Razor" – a new view engine for ASP.NET". asp.net. 3 July 2010. https://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx

  2. "MSDN Blogs". msdn.com. Microsoft. Archived from the original on 2012-07-02. Retrieved 2011-07-08. https://web.archive.org/web/20120702131534/http://blogs.msdn.com/b/webdevtools/archive/2011/01/12/how-to-get-razor-syntax-support-in-visual-studio-2010.aspx

  3. "MSDN Blogs". msdn.com. Microsoft. Archived from the original on 2012-07-02. Retrieved 2011-07-08. https://web.archive.org/web/20120702131534/http://blogs.msdn.com/b/webdevtools/archive/2011/01/12/how-to-get-razor-syntax-support-in-visual-studio-2010.aspx

  4. Chadwick, Jess (9 September 2011). Programming Razor: Tools for Templates in ASP.NET MVC or WebMatrix. "O'Reilly Media, Inc.". ISBN 978-1-4493-1716-4. 978-1-4493-1716-4

  5. Jon Galloway (19 February 2020). "MVC 3 - Razor View Engine". The Official Microsoft ASP.NET Site. https://www.asp.net/mvc/videos/mvc-3/mvc-3-razor-view-engine

  6. "ScottGu's Blog - Introducing "Razor" – a new view engine for ASP.NET". asp.net. 3 July 2010. https://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx

  7. "ASP.NET MVC View Engine Comparison". stackoverflow.com. https://stackoverflow.com/questions/1451319/asp-net-mvc-view-engine-comparison