61,115
社区成员
发帖
与我相关
我的任务
分享
@model ViewModel.ViewModel.BaseViewModel
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>@RenderSection("TitleSection")</title>
@RenderSection("HeaderSection", false)
</head>
@Html.Partial("Top", Model.TopData)
<body>
<div>
</div>
<div>
@RenderSection("ContentBody")
</div>
@Html.Partial("Footer", Model.FooterData)
</body>
</html>
@model ViewModel.ViewModel.PersonListViewModel
@{
Layout = "~/Views/Shared/MyLayout.cshtml";
}
<!DOCTYPE html>
@section TitleSection{
Home
}
@section ContentBody{
<div>
<table border="1">
<tr>
<th>姓 名</th>
<th>年 龄</th>
<th>薪 水</th>
</tr>
@foreach (ViewModel.ViewModel.PersonViewModel item in Model.Persons)
{
<tr>
<td>@item.Name</td>
<td>@item.Age</td>
<td style="color:@item.SalaryColor">@item.Salary</td>
</tr>
}
</table>
</div>
}