The new view engine will reduce number of characters to code and easy to learn. Let's see few examples using Razor:
In earlier version for Code blocks:
Hi <%= id %> (or) <%= DateTime.Now.Month %>
In Razor:
@id (or) @DateTime.Now.Month
In earlier version for for loops:
<% for(int i=0; i< 10; i++) { %>
<p><%= i %> </p>
<% } %>
In Razor:
@for(int i=0; i< 10;i++){
<p>@i</p>
}
@id (or) @DateTime.Now.Month
For more details, refer: http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Gowtham RajamanickamPosted Jul 9, 2015, 12:29 AM
Thanks..
Mike GoldPosted Aug 28, 2010, 3:58 PM
Thankfully its not yet another language to learn from Microsoft and seems c# -like enough. Looking forward to playing around with it.