The Turnbull's Web Log
    We talk pottery, crafts and computing

Welcome to our Personal Web Site and Blog   
Hi, I'm Jack - I love golf, computing and fast cars ( I have one of the first Vauxhall VX220's (2001), or Opel Roadster, depending where you're from). My heroes are Tony Jacklin and Jeremy Clarkson.

Annette enjoys pottery and glass-making and is currently into making ceramic tortoises and unique vases.
We'll put up some photos as production progresses.

We are going to divide the site into areas of individual and common interest. We hope you'll like it. We will be continually building and improving the site. If you have constructive suggestions for improvement, please comment in the guestbook.

We live in Poole, Dorset (as you may have gathered from the weather feed to the left). The heading picture is of Poole harbour with 'Old Harry' rock towards the right.

Some gallery sections will require registering for you to see the photos - this is easy to do and we will enable access as soon as possible after registration and send you an email. Also if you comment in the blog section, this will not appear immediately - due to current state of the internet, we have to moderate this - comments will appear as soon as we can read and approve.

Thanks for your interest and we'd love to hear from you.

Selected Blog Subject

 05 November 2012

ListView Paging in ASP.Net   
I have been using Gridview.PageIndex to select the desired page via  a querystring on loading for years but had trouble working out the equivalent for a ListView. It turns out you have to set via the ListView's DataPager properties:

Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        If (IsPostBack = False) Then
            Dim i As Integer = [Convert].ToInt32(Request.QueryString("Page"))
            Dim myPager As DataPager = ListView1.FindControl("myPager")
            If (i >= 0) Then
                myPager.SetPageProperties(i, myPager.MaximumRows, True)
            End If
        End If
End Sub


Simples!

Jack at 10:34 | (0) Comments | Leave a comment