Quantcast
Channel: World Wide Code » HTML5
Viewing all articles
Browse latest Browse all 7

Introducing “Razor” – a new view engine for ASP.NET

$
0
0

This is a old post that I recently found on ScottGu’s Blog. This a great article giving basics of the writing a  ASP.Net MVC Application using the new Razor syntax.

Introducing “Razor” – a new view engine for ASP.NET –  Scott Gu

Some Excerpts:

You denote the start of a code block with Razor using a @ character.  Unlike <% %> code nuggets, Razor does not require you to explicitly close the code-block:

image

Like our foreach example above, you can embed content within if statements (or any other C# or VB language construct), without having to be explicit about the code block’s begin/end.  For example:

image

Related Links

Related articles



Viewing all articles
Browse latest Browse all 7

Latest Images

Trending Articles





Latest Images