目前,我的Web服务正确显示调用时的记录数。但是当绑定到detailsview时,我需要启用分页才能显示相关记录。我怎么能确保这样做?我有以下代码:
Protected Sub DetailsView1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewPageEventArgs) Handles DetailsView1.PageIndexChanging
DetailsView1.PageIndex = e.NewPageIndex
'Am i missing out some codes or steps here?
End Sub
答案 0 :(得分:1)
我想你错过了:
DetailsView1.DataBind()