标签:
第一步:

第二步:

第三步:

第四步:在网页代码中写显示格式代码,如下
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:笔记本ConnectionString %>" SelectCommand="SELECT [编号], [名称], [备注] FROM [bijiben]"></asp:SqlDataSource>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<HeaderTemplate>
<table>
<tr>
<td>编号</td>
<td>名称</td>
<td>备注</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#DataBinder.Eval(Container.DataItem,"编号") %></td>
<td><%#DataBinder.Eval(Container.DataItem,"名称") %></td>
<td><%#DataBinder.Eval(Container.DataItem,"备注") %></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
完成--------

标签:
原文地址:http://www.cnblogs.com/hqjy/p/4302286.html