Monday, October 31, 2011

Asp.net mvc razor loops syntax

Let’s look at following example where we want to list some Employees information using Razor view engine


<ul>
  @foreach(var emp in EmployeeList)
  {
 <li>
  @emp.EmployeeName - (@emp.EmpCode)
 </li>  
  }
</ul>

No comments:

Twitter Bird Gadget