Case 1:
Basically you can observe this within your application itself. MVC itself provide you your answer. When ? When you creating View against the action which returning list. Say your action returning list of customer then you can observe following code.
@model IEnumerable<Customer>
<h2>Customers</h2>
<p>
@Html.ActionLink("Create New", "CreateCustomer", "ControllerName")
</p>
<table>
<tr>
<th>
@Html.DisplayNameFor(model => model.Email)
</th>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th></th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Email)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.ActionLink("Edit |", "UpdateCustomer", new { id = item.Id})
@Html.ActionLink("Details", "Details", new { id = item.Id})
@Html.ActionLink("Delete", "Delete", new { id = item.Id})
</td>
</tr>
}
</table>
Case 2:
your scenario is when you sending the list within ViewData. Then you have to cast ViewData into respective model list and then you can perform same foreach loop.
Action:
var info = add.jumbo();
ViewData["sample"] = info;
return View("FormResults");
View:
@if (ViewData["sample"] != null)
{
List<Info> infoList = (List<Info>)ViewData["sample"];
foreach (var i in infoList)
{
//Perform your html here enclosed with html tags.
}
}