Click here to Skip to main content
Click here to Skip to main content

Tagged as

asp.net mvc razor loops syntax

, 23 Aug 2011
Rate this:
Please Sign up or sign in to vote.
asp.net mvc razor loops syntax
ref : asp.net mvc razor loops
 
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>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

A Mahesh
Web Developer
India India
Symphony Services, Banglore, 560 087, India
Follow on   Twitter

Comments and Discussions

 
Question[My vote of 2] not an article PinmemberDonsw2-Apr-12 16:24 
this is too short for an article.
 
I really wanted to read more.
cheers,
Donsw
My Recent Article : CDC - Change Data Capture

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140814.1 | Last Updated 24 Aug 2011
Article Copyright 2011 by A Mahesh
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid