vincentbeaver
New Member
In my last question I was having problems looping through a list with jQuery. Then we figured this out and it worked perfectly: \[code\]public List<Sale> AllSales { get; set; }for (var i = 0; i < <%= AllSales.Count %>; i++) {}\[/code\]I now need to use the values inside the loop so I thought it would be as simple as this : \[code\] for (var i = 0; i < <%= AllSales.Count %>; i++) { var date = <%= AllSales.Date %>; alert(date); }\[/code\]When I first tried this, it said "The name 'i' does not exist in the current context", so I just put 0 instead of i instead of \[code\]AllSales[0]\[/code\]. Then nothing happens.What am I missing?