ASP.NET Web Pages
   HOME

TheInfoList



OR:

Razor is an
ASP.NET ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name s ...
programming syntax used to create
dynamic web page A server-side dynamic web page is a web page whose construction is controlled by an application server processing server-side scripts. In server-side scripting, parameters determine how the assembly of every new web page proceeds, and includin ...
s with the C# or
VB.NET Visual Basic, originally called Visual Basic .NET (VB.NET), is a multi-paradigm, object-oriented programming language, implemented on .NET, Mono, and the .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visua ...
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 MVC may refer to: Science and technology * Maximum-value composite procedure, an imaging procedure * Multivariable calculus, a concept in mathematics * Multivariable control, a concept in process engineering * Mechanical vapor compression, a desal ...
3 and the
WebMatrix Microsoft WebMatrix is a discontinued cloud-connected website builder and HTML editor for Windows, geared towards web development. WebMatrix enables developers to build websites using built-in templates or popular open-source applications, with f ...
tool set. Razor became a component of AspNetWebStack and then became a part of ASP.NET Core.


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. 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. Other advantages that have been noted: * Supports
IntelliSense Intelligent code completion is a context-aware code completion feature in some programming environments that speeds up the process of coding applications by reducing typos and other common mistakes. Attempts at this are usually done through auto-c ...
– statement completion support * Supports "layouts" – an alternative to the "master page" concept in classic
Web Forms A webform, web form or HTML form on a web page allows a user to enter data that is sent to a server for processing. Forms can resemble paper or database forms because web users fill out the forms using checkboxes, radio buttons, or text fields. F ...
(.aspx) * Unit testable


See also

*
Blazor Blazor is a free and open-source web framework that enables developers to create web apps using C# and HTML. It is being developed by Microsoft. Overview Five different editions of Blazor apps have been announced. Blazor Server: These apps ar ...


References


External links


Introduction to Razor Pages in ASP.NET Core
at
Microsoft Docs Microsoft Docs is the library of technical documentation for end users, developers, and IT professionals who work with Microsoft products. The Microsoft Docs website provides technical specifications, conceptual articles, tutorials, guides, API ...
*
ASP.NET Web Pages
at
Microsoft Docs Microsoft Docs is the library of technical documentation for end users, developers, and IT professionals who work with Microsoft products. The Microsoft Docs website provides technical specifications, conceptual articles, tutorials, guides, API ...

Overview of ASP.NET Core MVC
at
Microsoft Docs Microsoft Docs is the library of technical documentation for end users, developers, and IT professionals who work with Microsoft products. The Microsoft Docs website provides technical specifications, conceptual articles, tutorials, guides, API ...
*
ASP.NET MVC
at
Microsoft Docs Microsoft Docs is the library of technical documentation for end users, developers, and IT professionals who work with Microsoft products. The Microsoft Docs website provides technical specifications, conceptual articles, tutorials, guides, API ...
* (archived). Current development is held at {{Web frameworks
Razor A razor is a bladed tool primarily used in the removal of body hair through the act of shaving. Kinds of razors include straight razors, safety razors, disposable razors, and electric razors. While the razor has been in existence since before t ...
Free and open-source software Microsoft application programming interfaces Microsoft free software Microsoft Visual Studio Software using the Apache license Template engines Web frameworks 2010 software Windows-only free software