I created a c# mvc app over a year ago where I had a dataset of names and pictures and my app creating a new li for every person on the list when the page loaded.
@foreach (var people in Model)
<img alt="Image"src="/@Person.PicturePath" /></a>
I originally wrote this code, but I want to know if im doing it the right way since i will want to add buttons and a number of variables inside each of the list items
<ul id="nav" >
a = new Array("pub 1", "pub 2", "pub 3");
for (var i = 0; i < a.length; i++)
document.write("<li>" + a[i] + "</li> ");