0
comment
comment
on 10/26/2012 10:37 AM
Razor is a programming syntax for dynamic ASP.Net web pages released in 2011. Here’s a C# syntax example from W3 Schools: <!-- Single statement block -->
@{ var myMessage = "Hello World"; }
<!-- Inline expression or variable -->
<p>The value of myMessage is: @myMessage</p>
<!-- Multi-statement block -->
@{
var greeting = "Welcome to our site!";
var weekDay = DateTime.Now.DayOfWeek;
var greetingMessage = greeting + " Today is: " + weekDay;
}
<p>The greeting is: @greetingMessage</p>
Here’s an exam[...]