我正在尝试为我正在处理的网站设置分页,我正在使用列表视图。我做了很多阅读,但似乎没有任何意义。下面是我正在进行的代码查询的类型,我在VB和oracle中工作:
<ItemTemplate>
<div class="listItemWrap">
<div class="leadListItem">
<div class="left leadListCol1 borderNone">
<h3 class="upperCase"><%#Eval("lead_name")%></h3>
<h3><%# Eval("leadcode")%></h3>
</div>
<div class="left leadListCol2">
<h3>EMAILS <span>
<asp:Image ID="EmailsTickCross" runat="server" ImageUrl="/Images/Layout/Tick.jpg" /></span></h3>
<h3>CALLS <span>
<asp:Image ID="CallsTickCross" runat="server" ImageUrl="/Images/Layout/Cross.jpg" /></span></h3>
<h3>POSTAL <span>
<asp:Image ID="PostalTickCross" runat="server" ImageUrl="/Images/Layout/Tick.jpg" /></span></h3>
</div>
<div class="left leadListCol3">
<h3>LATEST INSIGHT VISIT:</h3>
<p class="upperCase"><%# CType(Eval("last_insight"), Date).ToString("dd-MMM-yy")%></p>
</div>
<div class="left leadListCol4">
<asp:Button ID="ActiveProfileBtn" CommandArgument='<%# Eval("leadcode")%>' runat="server" Text="VIEW PROFILE" CssClass="viewProfile right" />
<h3>LATEST HPB ACTIVITY:</h3>
<p>NA</p>
</div>
<div class="clr"></div>
<div class="leadListNotes">
<h3>NOTES:</h3>
<p><%# GetNotes(Eval("leadcode"))%></p>
</div>
</div>
</div>
</ItemTemplate>
VB:
Dim DT As New DataTable
Dim oCnn As New OracleConnection(OracleConnectionString)
Dim da As New OracleDataAdapter("select * from web_table", oCnn)
Try
oCnn.Open()
da.Fill(DT)
Catch ex As Exception
Finally
oCnn.Close()
End Try
ActiveLeadsListView.DataSource = DT
ActiveLeadsListView.DataBind()
对此的任何帮助都会很棒,我真的很喜欢这个。有大约20000行,所以我肯定需要分页。