.net repeater的用法
<divclass="bbstextline"><asp:RepeaterID="Repeater1"runat="server"DataSourceID="SqlDat...
<div class="bbstextline">
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT TOP 6 [zp_title] FROM [t5cms_jobinfo]">
</asp:SqlDataSource>
</div> 绑定数据源了啊,怎么用,急啊,谢谢各位了! 展开
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT TOP 6 [zp_title] FROM [t5cms_jobinfo]">
</asp:SqlDataSource>
</div> 绑定数据源了啊,怎么用,急啊,谢谢各位了! 展开
2个回答
2014-01-10
展开全部
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table style="width: 99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 50%" align="center">
留言内容
</td>
<td style="width: 15%" align="center">
留言ip
</td>
<td style="width: 20%" align="center">
功能
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 50%" align="center">
<%#DataBinder.Eval(Container.DataItem, "pinglunnr").ToString().Substring(0,30)%>...
</td>
<td style="width: 15%" align="center">
<%#DataBinder.Eval(Container.DataItem, "ip")%>
</td>
<td style="width: 20%" align="center">
<%#DataBinder.Eval(Container.DataItem, "sh1")%>| <a href="./plshenhe.aspx?cmd=view&id=<%#DataBinder.Eval(Container.DataItem, "pinglunnum")%>&sh1=<%#DataBinder.Eval(Container.DataItem, "sh1")%>&m=<%=Request["m"] %>">
查看</a>
</td>
</tr>
</table>
<HeaderTemplate>
<table style="width: 99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 50%" align="center">
留言内容
</td>
<td style="width: 15%" align="center">
留言ip
</td>
<td style="width: 20%" align="center">
功能
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 50%" align="center">
<%#DataBinder.Eval(Container.DataItem, "pinglunnr").ToString().Substring(0,30)%>...
</td>
<td style="width: 15%" align="center">
<%#DataBinder.Eval(Container.DataItem, "ip")%>
</td>
<td style="width: 20%" align="center">
<%#DataBinder.Eval(Container.DataItem, "sh1")%>| <a href="./plshenhe.aspx?cmd=view&id=<%#DataBinder.Eval(Container.DataItem, "pinglunnum")%>&sh1=<%#DataBinder.Eval(Container.DataItem, "sh1")%>&m=<%=Request["m"] %>">
查看</a>
</td>
</tr>
</table>
2014-01-10
展开全部
<div class="bbstextline">
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<HeaderTemplate>
<table>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#DataBinder.Eval(Container.DataItem,"zp_title")%></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT TOP 6 [zp_title] FROM [t5cms_jobinfo]">
</asp:SqlDataSource>
</div>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<HeaderTemplate>
<table>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#DataBinder.Eval(Container.DataItem,"zp_title")%></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT TOP 6 [zp_title] FROM [t5cms_jobinfo]">
</asp:SqlDataSource>
</div>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询