在HTML裡遍歷檢視

Our sky發表於2020-11-27
@Model TestNetCore.Areas.Models
@{
    ViewData["Title"] = "Home Page";
}

<div class="text-center">
    <h1 class="display-4">@Model.FullName</h1>
    @foreach (var m in @Model.list)
    {
        <h5>@m.FullName</h5>
    }
</div>

相關文章