我有以下代码ASP.NET电网与CSS行和列
List<Department> depts = new List<Department>();
Department.Add(new Department() { DNo = 1, DName = "Accounting", DFloor="6" });
Department.Add(new Department() { DNo = 2, DName = "FInance", DFloor="3" });
我想这个数据绑定到一个GridView,使其输出以下。观察每个星期和tr的课程。我怎样才能在ASP.NET中实现这一点?
<thead>
<tr>
<th class="DNo">DNo</th>
<th class="DName">DName</th>
<th class= "DFloor">DFloor</th>
</tr>
</thead>
<tr>
<td class="DNo">1</td>
<td class="DName">Accounting</td>
<td class="DFloor">6</td>
</tr>
<tr>
<td class="DNo">2</td>
<td class="DName">FInance</td>
<td class="DFloor">3</td>
</tr>