Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Look at Razor
WhatsApp
Sateesh Arveti
14y
10.8
k
0
0
25
Blog
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
Look at Razor
Up Next
Asp.Net MVC3 Razor with facebook Authentication
Ebook Download
View all
Diving Into ASP.NET WebAPI
Read by 21.5k people
Download Now!
Learn
View all
Membership not found