viewBag as a list

71

viewBag as a list -

<td>@((ViewBag.data as ICollection<Person>).First().FirstName)</td>

viewBag as a list -

<ul>
    @foreach (var person in ViewBag.data)
    {
        <li>@person.FirstName</li>
    }
</ul>

Comments

Submit
0 Comments