Interviews2 answers
What is Razor View Engine?
2 Answers
Razer view starts with @
Mukesh KumarPosted Sep 4, 2017, 11:17 PM EDT
Razor is the first major update to render HTML in MVC3. Razor was designed specifically as a view engine syntax. It has one main focus: code-focused templating for HTML generation. Here’s how that same markup would be generated using Razor:
@model MvcMusicStore.Models.Genre
@{ViewBag.Title = "Browse Albums";}
The Razor syntax is easier to type, and easier to read. Razor doesn’t have the XML-like heavy syntax.
of the Web Forms view engine.
@Model.Name Albums
-
@foreach (var album in Model.Albums)
{
-
@album.Title
}
Thennarasu NPosted Oct 21, 2016, 4:58 AM EDT

