我正在尝试使用 ListView 控件显示数据库中的数据列表,如下所示:
员工姓名:xxxxxxxxx ID:111111 职位:yyyyyxxxx 组织:uuuuuu
这意味着我想在一个包含 4 列的表格中列出数据,其顺序如下: 属性 值 属性 值
我修改了以获得这种风格,我成功了。我现在的问题是在两个值列中从数据库中检索数据。我不知道该怎么做。
我的部分代码:
<LayoutTemplate>
<table border="0" cellpadding="1">
<tr style="background-color:#003366; color:white">
<th align="left"> Employee Name </th>
<td>
</td>
<th align="left">ID</th>
<td></td>
</tr>
<tr style="background-color:#003366; color:white">
<th align="left">Job Title.</th>
<td></td>
<th align="left">Organization</th>
<td></td>
</tr>
<tr id="itemPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>