i want to know how i can use Dynamic c# whenever i not inherited my views by model.
are their any way to write dynamic c# in views whenever i use Razor.
like how i can write razor code who match this aspx cod
<% List<item> items = new List<ite开发者_如何学编程m>(); %>
how i can write this in my MVC 3 application views [razor]
@{
List<item> items = new List<item>();
}
Scott Gu has a full coverage about razor syntax.
Basic rule of thumb:
<%= %> becomes @( )
and
<% %> becomes @{ }
精彩评论