ASP.NET Razor

维基百科,自由的百科全书
Razor
原作者Microsoft
開發者.NET Foundation
首次发布2010年6月,​13年前​(2010-06
源代码库github.com/aspnet/Razor
github.com/aspnet/AspNetWebStack
github.com/dotnet/aspnetcore
编程语言C#, VB.NET, HTML
操作系统Microsoft Windows
类型Web应用框架
许可协议Apache License 2.0[1]
网站www.asp.net/web-pages
Razor文件格式
扩展名
.razor, .cshtml, .vbhtml
互联网媒体类型
text/html
开发者Microsoft

RazorASP.NET的一种采用C#VB.NET语言创建动态网页的方法。

历史

Razor于2010年6月开发[3]。2011年1月随Microsoft Visual Studio 2010发布。[4]并作为MVC 3和WebMatrix 工具集的一部分。[4]

Razor已经是AspNetWebStack和ASP.NET Core的一部分。

设计

ASP.NET Web Forms (.aspx)使用<%= %>符号指出代码块的边界。但Razor语法采用@字符指出代码块。[5]减少了键盘输入。[3]其他优点还有:[6]

参见

参考文献

  1. ^ Razor/LICENSE.txt at master · aspnet/Razor · GitHub. GitHub. [2022-03-09]. (原始内容存档于2022-04-05). 
  2. ^ Microsoft ASP.NET Razor. NuGet. [2022-03-09]. (原始内容存档于2022-04-05). 
  3. ^ 3.0 3.1 ScottGu's Blog - Introducing "Razor" – a new view engine for ASP.NET. asp.net. [2022-03-09]. (原始内容存档于2010-11-10). 
  4. ^ 4.0 4.1 MSDN Blogs. msdn.com. Microsoft. [2011-07-08]. (原始内容存档于2012-07-02). 
  5. ^ Jon Galloway. MVC 3 - Razor View Engine. The Official Microsoft ASP.NET Site. [2022-03-09]. (原始内容存档于2016-09-19). 
  6. ^ ASP.NET MVC View Engine Comparison. stackoverflow.com. [2022-03-09]. (原始内容存档于2022-04-24). 

外部链接