I am working with vwstyles.xsl to implement custom paging on lists. The requirement I have is to have first and last button on the paging panel but can't work out how to direct the user to the last page as there is no total row count being passed through to the XSLT.

Is this possible with XSLT?

Can I use extension methods so I can hook up C# to the XSL?

Is there any other way of me implementing the required functionality?

  • 1
    Kindly share the code once you get it works ya.. looking for end button to go to the last page but can't find any reference. I tried to find the total items or rows when using pagination but it limit the query based on the rowlimit. Need to find a way to get the real total rows list when using pagination.
    – user5127
    Commented Oct 5, 2011 at 18:52
  • That is exactly the same issue I am having, doubting whether it is actually possible without a nasty hack
    – Burt
    Commented Oct 6, 2011 at 10:19
  • @ixiel: I went ahead and converted your answer to a comment. With a bit more reputation, you will be able to post comments.
    – Kit Menke
    Commented Oct 6, 2011 at 13:37

3 Answers 3


When you're trying to find the last page can't you count the amount of rows that you have?

<xsl:variable name="RowCount" select="count($Rows)"/>

But you can use xsl to do paging. You can easily use jquery for this google .."Jquery Paging" Hope that helps

  • Thanks for the answer, I can get the paging mostly working, the bit I can't get working is the last button that takes you to the last page as the XSL doesn't have a total list row count. Dlo you know if that is possible?
    – Burt
    Commented Oct 5, 2011 at 10:33
  • 1
    Post some snippet code Cheers
    – naijacoder
    Commented Oct 6, 2011 at 23:24

You can use the XSLT count() function to count the number of child elements. That should let you generate the number of pages to have.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.