Wrox Programmer Forums
|
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 21st, 2010, 03:21 AM
Authorized User
 
Join Date: Dec 2007
Posts: 59
Thanks: 9
Thanked 0 Times in 0 Posts
Default CollectionPager QueryStringKey

Hello everybody

I have tried to my best to fix the changing the page but not successfully.
please help me how to customize the page by rewrite
like this "CollectionPager1.QueryStringKey = "travel/" & _
' Replace(LCase(dt.Tables(0).Rows(0).Item("GroupName ").ToString), " ", "-") & "/page-" & paging & ".html""


<cc1:CollectionPager ID="CollectionPager1" runat="server"
BackNextLocation="Split" BackText="« Prev " NextText=" Next » "
ResultsLocation="Top" BackNextLinkSeparator="" PageNumbersDisplay="Results"
ResultsStyle="PADDING:4px 4px 4px 4px ; FONT-WEIGHT: bold;"
PagingMode="QueryString" QueryStringKey="page">
</cc1:CollectionPager>

code behind

Public Sub LoadTourList(ByVal Gkey As String, Optional ByVal language As Boolean = False)
Dim AD As New clsTour
Dim paging As String = Request.QueryString("p")
Dim dt As Data.DataSet = AD.TourList(False, Gkey)
If dt.Tables.Count > 0 Then
Me.gvwBigTourList.DataSource = dt
Me.gvwBigTourList.DataBind()
CollectionPager1.MaxPages = 10000
CollectionPager1.PageSize = 10
CollectionPager1.DataSource = dt.Tables(0).DefaultView
CollectionPager1.BindToControl = gvwBigTourList
gvwBigTourList.DataSource = CollectionPager1.DataSourcePaged
'CollectionPager1.QueryStringKey = "travel/" & _
' Replace(LCase(dt.Tables(0).Rows(0).Item("GroupName ").ToString), " ", "-") & "/page-" & paging & ".html"

tbtour.Visible = True
Else
tbtour.Visible = False
tblsearch1.Visible = False
End If

this is the link that can help me to do this "http://tontip.blogspot.com/2009/04/pager-control-for-repeater-datalist-or.html"

dt.Dispose()
End Sub

Last edited by phuc2583; January 21st, 2010 at 03:22 AM.. Reason: lack of information









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.