嗨!如何使用Asp.Net和C#在Datalist中启用参与?请帮我 [英] Hi! How Can I Enable Pagging In Datalist By Using Asp.Net And C#? Please Help Me
本文介绍了嗨!如何使用Asp.Net和C#在Datalist中启用参与?请帮我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<asp:DataList dir="rtl" ID="DataList1" runat="server" DataKeyField="Co_id" DataSourceID="SqlDataSource1" Width="100%" >
<itemtemplate>
<img src='<%# Eval("Img") %>' style="width:60%;height:300px; margin-top:20px;margin-right:30px; " /><br />
<asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' Font-Size="X-Large" />
<br />
<asp:Label ID="ImgLabel" runat="server" Text='<%# Eval("Img") %>' Visible="False" />
<asp:Label ID="DescrLabel" runat="server" Text='<%# Eval("Descr") %>' />
<br /><br />
<hr style="width:96%; margin:auto" />
</itemtemplate>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:cinemaConnectionString3 %>" SelectCommand="SELECT [Co_id], [Title], [Img], [Descr] FROM [Content] order by Co_id desc" >
推荐答案
ConnectionStrings:cinemaConnectionString3%> SelectCommand = SELECT [Co_id],[标题],[Img],[说明]来自[内容]顺序的Co_id desc >
ConnectionStrings:cinemaConnectionString3 %>" SelectCommand="SELECT [Co_id], [Title], [Img], [Descr] FROM [Content] order by Co_id desc" >
请通过以下链接来帮助您在Datalist中实现自定义分页。
http://www.c-sharpcorner.com / UploadFile / 718fc8 / paging- in-datalist-control / [ ^ ]
http ://aspalliance.com/articleViewer.aspx?aId = 157& pId [ ^ ]
http://www.dotnetbull.com/2012/08/paging-in-datalist-in-aspnet.html [ ^ ]
Please go through below links that will help you to implement custom paging in Datalist.
http://www.c-sharpcorner.com/UploadFile/718fc8/paging-in-datalist-control/[^]
http://aspalliance.com/articleViewer.aspx?aId=157&pId[^]
http://www.dotnetbull.com/2012/08/paging-in-datalist-in-aspnet.html[^]
这篇关于嗨!如何使用Asp.Net和C#在Datalist中启用参与?请帮我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文