1个回答
2014-01-09
展开全部
<asp:Repeater ID="rp" runat="server" DataSourceID="odsBooks"> <ItemTemplate>
<ul class="title_ul2">
<li class="title_booklist0"><a href="/"><%#CutString(Eval("title").ToString(),30) %></a></li>
<li class="title_booklist1"><%#Eval("author") %></li>
<li class="title_booklist2"><%#Eval("publisher.Name") %></li>
<li class="title_booklist3"><%#Eval("publishdate","{0:yyyy年MM月}") %></li>
<li class="title_booklist4"><%#Eval("unitPrice","{0:0.00}") %>元</li>
</ul>
</ItemTemplate>
<AlternatingItemTemplate>
<ul class="title_ul3">
<li class="title_booklist0"><a href="/"><%#CutString(Eval("title").ToString(),30) %></a></li>
<li class="title_booklist1"><%#Eval("author") %></li>
<li class="title_booklist2"><%#Eval("publisher.Name") %></li>
<li class="title_booklist3"><%#Eval("publishdate","{0:yyyy年MM月}") %></li>
<li class="title_booklist4"><%#Eval("unitPrice","{0:0.00}") %>元</li>
</ul>
</AlternatingItemTemplate>
</asp:Repeater><asp:ObjectDataSource ID="odsBooks" runat="server" SelectMethod="GetNewBook" TypeName="BLL.BookManager">
<SelectParameters>
<asp:Parameter DefaultValue="20" Name="num" Type="Int32" />
</SelectParameters></asp:ObjectDataSource>
<ul class="title_ul2">
<li class="title_booklist0"><a href="/"><%#CutString(Eval("title").ToString(),30) %></a></li>
<li class="title_booklist1"><%#Eval("author") %></li>
<li class="title_booklist2"><%#Eval("publisher.Name") %></li>
<li class="title_booklist3"><%#Eval("publishdate","{0:yyyy年MM月}") %></li>
<li class="title_booklist4"><%#Eval("unitPrice","{0:0.00}") %>元</li>
</ul>
</ItemTemplate>
<AlternatingItemTemplate>
<ul class="title_ul3">
<li class="title_booklist0"><a href="/"><%#CutString(Eval("title").ToString(),30) %></a></li>
<li class="title_booklist1"><%#Eval("author") %></li>
<li class="title_booklist2"><%#Eval("publisher.Name") %></li>
<li class="title_booklist3"><%#Eval("publishdate","{0:yyyy年MM月}") %></li>
<li class="title_booklist4"><%#Eval("unitPrice","{0:0.00}") %>元</li>
</ul>
</AlternatingItemTemplate>
</asp:Repeater><asp:ObjectDataSource ID="odsBooks" runat="server" SelectMethod="GetNewBook" TypeName="BLL.BookManager">
<SelectParameters>
<asp:Parameter DefaultValue="20" Name="num" Type="Int32" />
</SelectParameters></asp:ObjectDataSource>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询