1、在后台为rpShow绑定list,前台可直接绑定每一列的值
<asp:Repeater ID="rpShow" runat="server">
<ItemTemplate>
<tr onmouseover="onChangeItem(this,1)" onmouseout="onChangeItem(this,2)">
<td align="center"><%# (Container.ItemIndex+1) %></td>
<td align="left"> <a class="abtn2" style="cursor:pointer;" href="View.aspx?keyid=<%# Eval("Id")%> " ><%# Eval("Title")%></a></td>
<td align="center"><%#string.Format("{0:yyyy-MM-dd HH:mm}", Eval("ReceiveDate"))%></td>
<td align="center" style="word-wrap:break-word;word-break:break-all"> <%# Eval("FromUnit")%></td>
<td align="center"> <%# Eval("ProcessID")%></td>
<td align="center"> <%# Eval("ReceiveNumber")%></td>
<td align="center"><%# GetUserName(Eval("UserCode").ToString())%></td>
</tr>
</ItemTemplate>
</asp:Repeater>
2、 直接循环<tr>
<% foreach (FileChange_RecordShow i in List)
{ %>
<tr onmouseover=" onChangeItem(this, 1) " onmouseout=" onChangeItem(this, 2) ">
<td align="center"><%= i.SOURCESYSTEMNAME%></td>
<td align="center"><%= i.SOURCEMODULEIDNAME%></td>
<td align="center"><%= i.FILENAME%></td>
<td align="center"><%= i.FILESIZE%></td>
<td align="center"><%= i.CHANGETIME.ToString("yyyy-MM-dd HH:mm:ss")%></td>
</tr>
<% } %>