Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the source code for the Razor View Engine for ASP.NET MVC located? [closed]

I would like to study the source of the Razor view engine. Since MS provides the source for MVC, I assumed that Razor's is available too... but have been unable to locate it. Any suggestions?

like image 279
Andrew Avatar asked Jan 10 '11 21:01

Andrew


People also ask

What is the Razor View engine in MVC?

The Razor View Engine is more advanced and is now the default view engine of ASP.NET Core MVC. This article compares these two view engines in brief and then discusses how you can work with the Razor View Engine in ASP.NET Core MVC. To work with the code examples provided in this article, you should have Visual Studio 2019 installed in your system.

What is the difference between Razor and ASP NET MVC?

It is a server side markup language. Razor has no ties to ASP.NET MVC because Razor is a general-purpose templating engine. You can use it anywhere to generate output like HTML. It's just that ASP.NET MVC has implemented a view engine that allows us to use Razor inside of an MVC application to produce HTML.

What is the default view engine for MVC?

The Razor View Engine is now the default view engine for ASP.NET Core MVC applications. While the ASPX View Engine is available as part of the System.Web.Mvc.WebFormViewEngine namespace, the Razor View Engine is available in the Microsoft.AspNetCore.Mvc.Razor namespace. How does a view engine work?

What is the difference between Razor engine and web form?

The namespace for Razor Engine is System.Web.Razor. View file extension is .cshtml or .vbhtml (partial and layout view) based on language. Razor syntax is easy to learn and much cleaner than Web Form syntax. Razor Engine does not support design mode in VS means you can not see your view page look and feel.


2 Answers

The source for MVC 3 Beta version of Razor is available here: http://aspnet.codeplex.com/releases/view/54306. However, this release is quite old and there have been a number of changes to Razor.

The final source for Razor will be made available soon after the release of MVC3 RTM

like image 94
marcind Avatar answered Oct 08 '22 16:10

marcind


I know this is an old question, but Microsoft just released the source code for Razor, WebMatrix.Data, System.Json, and a number of other ASP.NET stack technologies.

See the source code here . Apache 2.0 license.

like image 42
Jim Schubert Avatar answered Oct 08 '22 18:10

Jim Schubert