Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 13 of 13

Thread: Paging Feature Question

  1. #1
    jasont is offline Member
    Join Date
    Jul 2009
    Posts
    36

    Post Paging Feature Question

    Without buying a custom mod or addon is there a method to change the paging viewed at the top of category, manufacturer, and department pages? Currently my pages look like this:



    Im using the entity.tableexpanded2.xml.config for both the Manufacturer and Category pages. Thank you in advance
    Last edited by Mike The Last Boyscout; 08-06-2009 at 11:16 AM.

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    What version are you on? See the image below, this is what I can see on my stock copy. I'm on the latest version.

    Name:  table.jpg
Views: 791
Size:  44.7 KB

  3. #3
    jasont is offline Member
    Join Date
    Jul 2009
    Posts
    36

    Default

    I am currently using AspDotNetStorefront ML 8.0.0.0/8.0.0.0

  4. #4
    MelanieA is offline Junior Member
    Join Date
    Sep 2008
    Posts
    313

    Default

    Please make sure that your Page Size on your Edit Category Option is set to 20 or not set to 1.

  5. #5
    jasont is offline Member
    Join Date
    Jul 2009
    Posts
    36

    Default

    page size is set to 20. there are over 5000 items with this manufacturer. hence why there is so many pages. There was a form post about custom pagination which is at

    http://forums.aspdotnetstorefront.co...ad.php?t=12231 but i do not have the source code to do the change. can someone point me in a direction to add this functionallity listed in this thread to a non-source code
    Last edited by jasont; 07-09-2009 at 10:22 AM. Reason: added more information

  6. #6
    DanV's Avatar
    DanV is offline Ursus arctos horribilis
    Join Date
    Apr 2006
    Posts
    1,568

    Default

    The paging requires source to change. There really isn't a shortcut around that.

  7. #7
    jasont is offline Member
    Join Date
    Jul 2009
    Posts
    36

    Default

    In 2 different threads there are referances to how to do this.

    http://forums.aspdotnetstorefront.co...ead.php?t=6907

    And

    http://forums.aspdotnetstorefront.co...ad.php?t=11714

    If someone can help me figure this out I would really appreciate it.

    Line Added to WebConfig


    Code:
    <add name="myCustomFunctions" type="Mycustom.AjaxPagingControl" namespace="urn:AjaxPagingControl" />
    my AjaxPagingControl.cs

    Code:
    // ------------------------------------------------------------------------------------------
    // Copyright AspDotNetStorefront.com, 1995-2007.  All Rights Reserved.
    // http://www.aspdotnetstorefront.com
    // For details on this license please visit  the product homepage at the URL above.
    // THE ABOVE NOTICE MUST REMAIN INTACT. 
    // ------------------------------------------------------------------------------------------
    
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Xml;
    using System.Xml.XPath;
    using System.Xml.Xsl;
    using System.IO;
    using System.Resources;
    using System.Globalization;
    using System.Reflection;
    using System.Data;
    using System.Configuration;
    using System.Drawing;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using System.Threading;
    using System.Text;
    using System.Text.RegularExpressions;
    using AspDotNetStorefrontCommon;    
        
    namespace Mycustom
    {
        public class AjaxPagingControl
    
    
        {
            public string AjaxPagingControl(string sBaseURL, String sPageNum, String sNumPages)
            {
                //-=-=-=- daRez: Pagination Mods
                //-=-=-=- Custom Ajax Pagination from http://www.dynamicdrive.com/dynamicindex17/ajaxpaginate/ (rezDefied)
                //-=-=-=- DEPENDENCIES: daPagination.js, daPagination.css
    
                InputValidator IV = new InputValidator("PagingControl");
                String BaseURL = IV.ValidateString("BaseURL", sBaseURL);
                int PageNum = IV.ValidateInt("PageNum", sPageNum);
                int NumPages = IV.ValidateInt("NumPage", sNumPages);
    
                string result = String.Empty;
    
                if (NumPages < 2)
                {
    
                    return "";
                }
                if (BaseURL.Length == 0)
                {
    
                    BaseURL = CommonLogic.GetThisPageName(false) + "?" + CommonLogic.ServerVariables("QUERY_STRING");
                }
                if (PageNum == 0)
                {
    
                    PageNum = CommonLogic.QueryStringUSInt("PageNum");
                }
                if (PageNum == 0)
                {
    
                    PageNum = 1;
                }
    
                String Separator = "?";
                if (BaseURL.IndexOf("?") != -1)
                {
                    Separator = "&";
                }
    
                StringBuilder tmpS = new StringBuilder(4096);
    
                tmpS.Append("<script type=\"text/javascript\">");
                tmpS.Append("var daPaginationArray = new Array(" + sNumPages + ");");
    
                for (int i = 0; i < NumPages; i++)
                {
    
                    if (BaseURL.ToLowerInvariant().IndexOf("pagenum=") == -1)
                    {
    
                        tmpS.Append("daPaginationArray[" + i.ToString() + "] = \"" + BaseURL + Separator + "pagenum=" + (i + 1).ToString() + "\";");
                    }
                    else
                    {
    
                        tmpS.Append("daPaginationArray[" + i.ToString() + "] = \"" + Regex.Replace(BaseURL, @"pagenum=\d+", "pagenum=" + (i + 1).ToString(), RegexOptions.Compiled) + "\";");
                    }
                }
    
    
                tmpS.Append("var daPages = {pages: daPaginationArray, selectedpage: 0};");
                tmpS.Append("var daBook = new ajaxpageclass.createBook(daPages, \"pcontent\", [\"paginate-top\",\"paginate-bottom\"]);");
    
                tmpS.Append("</script>");
    
                result = tmpS.ToString();
                return result;
            }
        }
    }
    My Entity.tableexpanded2.xml.config

    Code:
    <?xml version="1.0" standalone="yes" ?>
    <package version="2.1" displayname="Entity Table Expanded 2" debug="false" includeentityhelper="true">
    
        <!-- ###################################################################################################### -->
        <!-- Copyright AspDotNetStorefront.com, 1995-2009.  All Rights Reserved.					                -->
        <!-- http://www.aspdotnetstorefront.com														                -->
        <!-- For details on this license please visit  the product homepage at the URL above.		                -->
        <!-- THE ABOVE NOTICE MUST REMAIN INTACT.                                                                   -->
        <!--                                                                                                        -->
        <!-- ###################################################################################################### -->
    
    
        <query name="Products" rowElementName="Product">
            <sql>
                <![CDATA[
                    exec dbo.aspdnsf_GetProducts 
                        @categoryID = @CatID,
                        @sectionID = @SecID,
                        @manufacturerID = @ManID,
                        @distributorID = @DistID,
                        @genreID = @GenreID,
                        @vectorID = @VectorID,
                        @localeName = @locale,
                        @CustomerLevelID = @CustLevelID,
                        @affiliateID = @AffID,
                        @ProductTypeID = @ProdTypeID, 
                        @ViewType = 1,
                        @pagenum = @pgnum,
                        @pagesize = null,
                        @StatsFirst = 0,
                        @publishedonly = 1,
                        @ExcludePacks = 0,
                        @ExcludeKits = 0,
                        @ExcludeSysProds = 0,
                        @InventoryFilter = @InvFilter,
                        @sortEntityName = @entityname
                ]]>
            </sql>
            <queryparam paramname="@CatID" paramtype="runtime" requestparamname="CatID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@SecID" paramtype="runtime" requestparamname="SecID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@ManID" paramtype="runtime" requestparamname="ManID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@DistID" paramtype="runtime" requestparamname="DistID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@GenreID" paramtype="runtime" requestparamname="GenreID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@VectorID" paramtype="runtime" requestparamname="VectorID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@locale" paramtype="runtime" requestparamname="LocaleSetting" sqlDataType="varchar" defvalue="en-US"  validationpattern="" />
            <queryparam paramname="@CustLevelID" paramtype="runtime" requestparamname="CustomerLevelID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@AffID" paramtype="runtime" requestparamname="AffiliateID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@ProdTypeID" paramtype="runtime" requestparamname="ProductTypeFilterID" sqlDataType="int" defvalue="1"  validationpattern="" />
            <queryparam paramname="@pgnum" paramtype="request" requestparamname="pagenum" sqlDataType="int" defvalue="1"  validationpattern="" />
            <queryparam paramname="@InvFilter" paramtype="appconfig" requestparamname="HideProductsWithLessThanThisInventoryLevel" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@entityname" paramtype="runtime" requestparamname="EntityName" sqlDataType="varchar" defvalue=""  validationpattern="" />
        </query>
    
    
        <PackageTransform>
    
            <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mynamespace="urn:mynamespace" xmlns:aspdnsf="urn:AjaxPagingControl" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf mynamespace AjaxPagingControl">
                <xsl:output method="html" omit-xml-declaration="yes" />
    			<xsl:param name="LocaleSetting" select="/root/Runtime/LocaleSetting" />
                <xsl:param name="WebConfigLocaleSetting" select="/root/Runtime/WebConfigLocaleSetting" />
                <xsl:param name="ShowSubcatsInGrid">
                    <xsl:value-of select="aspdnsf:AppConfig('ShowSubcatsInGrid')" />
                </xsl:param>
                <xsl:param name="SubcatGridCols">
                    <xsl:value-of select="/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/ColWidth" />
                </xsl:param>
                <xsl:param name="EntityName">
                    <xsl:value-of select="/root/Runtime/EntityName" />
                </xsl:param>
                <xsl:param name="EntityID">
                    <xsl:value-of select="/root/Runtime/EntityID" />
                </xsl:param>
                <xsl:param name="WholesaleOnlySite">
                    <xsl:value-of select="aspdnsf:AppConfig('WholesaleOnlySite')"/>
                </xsl:param>
    
    
                <xsl:param name="BaseURL">
                    <xsl:choose>
                        <xsl:when test="aspdnsf:StrToLower(/root/Runtime/EntityName) = 'category'">c-<xsl:value-of select="/root/Runtime/EntityID" />-<xsl:value-of select="/root/QueryString/sename" />.aspx</xsl:when>
                        <xsl:when test="aspdnsf:StrToLower(/root/Runtime/EntityName) = 'section'">s-<xsl:value-of select="/root/Runtime/EntityID" />-<xsl:value-of select="/root/QueryString/sename" />.aspx</xsl:when>
                        <xsl:when test="aspdnsf:StrToLower(/root/Runtime/EntityName) = 'manufacturer'">m-<xsl:value-of select="/root/Runtime/EntityID" />-<xsl:value-of select="/root/QueryString/sename" />.aspx</xsl:when>
                        <xsl:when test="aspdnsf:StrToLower(/root/Runtime/EntityName) = 'library'">l-<xsl:value-of select="/root/Runtime/EntityID" />-<xsl:value-of select="/root/QueryString/sename" />.aspx</xsl:when>
                    </xsl:choose>
                </xsl:param>
    
                <xsl:param name="CurrentPage">
                    <xsl:choose>
                        <xsl:when test="/root/QueryString/pagenum">
                            <xsl:value-of select="/root/QueryString/pagenum" />
                        </xsl:when>
                        <xsl:otherwise>1</xsl:otherwise>
                    </xsl:choose>
                </xsl:param>
    
    
    
                <xsl:template match="/">
    				<div>
                    <xsl:value-of select="aspdnsf:EntityPageHeaderDescription($EntityName, $EntityID)" disable-output-escaping="yes" />
    				</div>
                    <xsl:value-of select="aspdnsf:EntityPageFilterOptions($EntityName, $EntityID, /root/Runtime/SecID, /root/Runtime/CatID, /root/Runtime/ManID, /root/Runtime/ProductTypeFilterID)" disable-output-escaping="yes" />
                    <xsl:call-template name="SubEntity" />
                    <xsl:choose>
                        <xsl:when test="count(/root/Products/Product) = 0 and count(/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/Entity) = 0">
                            <xsl:value-of select="aspdnsf:Topic(concat('empty', /root/Runtime/EntityName, 'text'))" disable-output-escaping="yes" />
                        </xsl:when>
                        <xsl:otherwise>
    						<div style="text-align:right;"><xsl:value-of select="urn:AjaxPagingControl($BaseURL, $CurrentPage, /root/Products2/Product/pages)" disable-output-escaping="yes" /></div>
    						<!--<div style="text-align:right;"><xsl:value-of select="aspdnsf:PagingControl($BaseURL, $CurrentPage, /root/Products2/Product/pages)" disable-output-escaping="yes" /></div>-->
    				                <table border="0" cellpadding="0" cellspacing="4" width="100%">
    									<TR>
    										<TD valign="top">
    											<div id="paginate-top" class="navRange"> </div>
    										</TD>
    									</TR>
                                        <xsl:apply-templates select="/root/Products/Product" />
    									<TR>
    										<TD>
    											<div id="paginate-bottom"> </div>
    										</TD>
    									</TR>
    
    								</table>
    						<div style="text-align:right;"><xsl:value-of select="urn:AjaxPagingControl($BaseURL, $CurrentPage, /root/Products2/Product/pages)" disable-output-escaping="yes" /></div>
    						<!--<div style="text-align:right;"><xsl:value-of select="aspdnsf:PagingControl($BaseURL, $CurrentPage, /root/Products2/Product/pages)" disable-output-escaping="yes" /></div>-->
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:template>
    
    
                <xsl:template name="SubEntity">
                    <xsl:for-each select="/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[ParentEntityID=/root/Runtime/EntityID]">
    
                        <xsl:choose>
                            <xsl:when test="$ShowSubcatsInGrid = 'true'">
                                <table border="0" cellpadding="0" cellspacing="4" width="100%">
                                    <xsl:if test="position() mod $SubcatGridCols = 1 or ($SubcatGridCols = 1)">
                                        <tr>
                                            <xsl:for-each select=". | following-sibling::*[position() &lt; $SubcatGridCols]">
                                                <xsl:variable name="scName" select="aspdnsf:GetMLValue(Name)" />
    
                                                <xsl:call-template name="SubCatCell">
                                                    <xsl:with-param name="scName" select="$scName" />
                                                </xsl:call-template>
                                            </xsl:for-each>
                                        </tr>
                                        <tr>
                                            <td height="10" colspan="{$SubcatGridCols}">*</td>
                                        </tr>
                                    </xsl:if>
                                </table>
                            </xsl:when>
                            <xsl:otherwise>
                                <xsl:variable name="scName" select="aspdnsf:GetMLValue(Name)" />
    
                                <p align="left">
                                    ***<img border="0" src="{concat('skins/skin_', aspdnsf:SkinID(), '/images/redarrow.gif')}"></img>*
                                    <a href="{aspdnsf:EntityLink(EntityID, SEName, $EntityName, 0, '')}">
                                        <xsl:value-of select="$scName" disable-output-escaping="yes"/>
                                    </a>
                                </p>
                            </xsl:otherwise>
                        </xsl:choose>
                    </xsl:for-each>
                </xsl:template>
    
    
                <xsl:template name="SubCatCell">
                    <xsl:param name="scName"></xsl:param>
                    <xsl:param name="pSEAltText" select="aspdnsf:GetMLValue(SEAltText)"></xsl:param>
                    <xsl:param name="AltText">
                        <xsl:choose>
                            <xsl:when test="$pSEAltText=''"><xsl:value-of select="$scName" /></xsl:when>
                            <xsl:otherwise><xsl:value-of select="$pSEAltText" /></xsl:otherwise>
                        </xsl:choose>
                    </xsl:param>
    
    
                    <xsl:param name="URL">
                        <xsl:value-of select="aspdnsf:EntityLink(EntityID, SEName, $EntityName, 0, '')" />
                    </xsl:param>
    
                    <td align="center">
                        <a href="{$URL}">
                            <xsl:value-of select="aspdnsf:LookupEntityImage(EntityID, $EntityName, 'icon', 0, $AltText)" disable-output-escaping="yes" />
                        </a>
                        <br/>
                        <a href="{$URL}">
                            <xsl:value-of select="$scName" disable-output-escaping="yes"/>
                        </a>
                    </td>
    
                </xsl:template>
    
    
                <xsl:template match="Product">
                    <xsl:param name="pName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
                    <xsl:param name="pDescription" select="aspdnsf:GetMLValue(Description)"></xsl:param>
                    <xsl:param name="pSalesPromptName" select="aspdnsf:GetMLValue(SalesPromptName)"></xsl:param>
                    <xsl:param name="pSEAltText" select="aspdnsf:GetMLValue(SEAltText)"></xsl:param>
                    <xsl:param name="AltText">
                        <xsl:choose>
                            <xsl:when test="$pSEAltText=''"><xsl:value-of select="$pName" /></xsl:when>
                            <xsl:otherwise><xsl:value-of select="$pSEAltText" /></xsl:otherwise>
                        </xsl:choose>
                    </xsl:param>
    
    
                    <xsl:param name="URL">
                        <xsl:value-of select="aspdnsf:ProductandEntityLink(ProductID, SEName, $EntityID, $EntityName, 0)" disable-output-escaping="yes" />
                    </xsl:param>
                    <tr>
                        <td>
                            <table width="100%" cellpadding="0" cellspacing="0" border="0" >
                                <tr>
                                    <td width="10%" align="left" valign="top" style="padding-right:10px;">
                                        <a href="{$URL}">
                                            <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFileNameOverride, SKU, 'icon', 0, $AltText)" disable-output-escaping="yes" />
                                        </a>
                                    </td>
                                    <td valign="top" align="left">
                                        <table width="100%" cellpadding="1" cellspacing="0" border="0">
                                            <tr>
                                                <td class="ProductNameText" align="left" valign="top">
                                                    <a href="{$URL}">
    													<xsl:value-of select="(concat(ManufacturerName,'*',$pName))" disable-output-escaping="yes"/>
                                                        <!--<xsl:value-of select="$pName" disable-output-escaping="yes"/>-->
                                                    </a>
                                                </td>
                                            </tr>
                                            <!--<tr>
                                                <td align="left" valign="top">
                                                    <xsl:value-of select="$pDescription" disable-output-escaping="yes" />
                                                </td>
                                            </tr>-->
                                            <tr>
                                                <td height="20">*</td>
                                            </tr>
    										<tr>
    											<td align="left" valign="top">
    												<xsl:value-of select="aspdnsf:StringResource(concat('show', $EntityName, '.aspx.50'), $LocaleSetting)" disable-output-escaping="yes" />
    												<xsl:value-of select="ManufacturerName" />
    											</td>
    										</tr>
    										<tr>
    											<td align="left" valign="top">
    												<xsl:value-of select="aspdnsf:StringResource(concat('show', $EntityName, '.aspx.51'), $LocaleSetting)" disable-output-escaping="yes" />
    												<xsl:value-of select="ManufacturerPartNumber" />
    											</td>
    										</tr>
                                            <tr>
                                                <td align="left" valign="top">
                                                    <xsl:value-of select="aspdnsf:StringResource(concat('show', $EntityName, '.aspx.29'), $LocaleSetting)" disable-output-escaping="yes" />
                                                    <xsl:value-of select="SKU" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left" valign="top">
                                                    <xsl:choose>
                                                        <xsl:when test="MiscText = 'SHOW INVENTORY'">
                                                            <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.20')" disable-output-escaping="yes" />
                                                            <xsl:value-of select="Inventory" />
                                                        </xsl:when>
                                                        <xsl:otherwise>
                                                            <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.21')" disable-output-escaping="yes" /> 
                                                            <xsl:choose>
                                                                <xsl:when test="number(Inventory)>0">
                                                                    <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.5')" disable-output-escaping="yes" />
                                                                </xsl:when>
                                                                <xsl:otherwise>
                                                                    <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.6')" disable-output-escaping="yes" />
                                                                </xsl:otherwise>
                                                            </xsl:choose>
                                                        </xsl:otherwise>
                                                    </xsl:choose>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left" valign="bottom">
                                                    <xsl:value-of select="aspdnsf:GetVariantPrice(VariantID, number(HidePriceUntilCart), Price, SalePrice, ExtendedPrice, Points, $pSalesPromptName, TaxClassID)" disable-output-escaping="yes" />
                                                </td>
                                            </tr>
    										<tr>
    											<td align="left" valign="bottom">
    												<xsl:if test="aspdnsf:AppConfigBool('DisplayOutOfStockProducts') = 'true'">
    															<xsl:value-of select="aspdnsf:DisplayProductStockHint(ProductID, VariantID,'Entity')" disable-output-escaping="yes" />													
    												</xsl:if>
    											</td>
    										</tr>
                                            <tr>
                                                <td height="20">*</td>
                                            </tr>
                                            <tr>
    											<td align="left" valign="bottom">
    											<xsl:choose>
    												<xsl:when test="IsAKit = 1 or IsAPack = 1">
    													<a href="{$URL}">
    														<img style="cursor:hand;" border="0" src="{concat('skins/skin_', aspdnsf:SkinID(), '/images/moreinfo.gif')}" alt="{aspdnsf:StringResource('image.altText.14', $LocaleSetting)}"></img>
    													</a>
    												</xsl:when>
    												<xsl:otherwise>
    													<xsl:value-of select="aspdnsf:AddtoCartForm(ProductID, VariantID, 0, 'left')" disable-output-escaping="yes" />
    												</xsl:otherwise>
    											</xsl:choose>
    
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="15">
                            <hr size="1" />
                        </td>
                    </tr>
                </xsl:template>
    
    
            </xsl:stylesheet>
        </PackageTransform>
    </package>
    Thank you in advance with this. We are about 1 week out from going live and I would really like to have some type of better paging that what is out of the box with the large amount of pages that there is with our manufacturers.

  8. #8
    Darth Rez is offline Junior Member
    Join Date
    Mar 2009
    Location
    Southern California
    Posts
    7

    Default

    Your web.config file and AjaxPagingControl.cs file possess naming and referencing conflicts.

    Didn't test ....xml.config, but the code in your web/app_code folder has a naming conflict.

    You need a different name for your class in AjaxPagingControl.cs. Change the red class name below to "jasont".

    namespace Mycustom{

    public class AjaxPagingControljasont{

    public string AjaxPagingControl(string sBaseURL, String sPageNum, String sNumPages){

    .
    .
    .



    Alter your web.config file to make available the new class with the following:

    <add name="Mycustom" namespace="urn:Mycustom" type="Mycustom.jasont" />

    Add the urn to the XMLPackage file:

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mynamespace="urn:mynamespace" xmlns:aspdnsfMycustom="urn:Mycustom" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf mynamespace AjaxPagingControl">

    Probably don't need the last red part above flagged with the RedFace.

    With the above changes, you should be able to call the AjaxPagingControl Method/Function from your ....xml.config file as such: <xsl:value-of select="Mycustom:AjaxPagingControl()" disable-output-escaping="yes" />

    Underestimate the DaRkSiDe at your own peril,
    Rez
    .

  9. #9
    cdub is offline Junior Member
    Join Date
    Jan 2009
    Posts
    17

    Default

    Changing the paging can be easily done by modifying the XML package you are using for your category. This is what we have done here:

    http://www.foxchapelpublishing.com/c...aspx?pagenum=4


    To accomplish something like this find the following in your entity's template file:

    C#/VB.NET Code:
    <xsl:value-of select="aspdnsf:PagingControl($BaseURL$CurrentPage, /root/Products2/Product/pages)" disable-output-escaping="yes" /> 
    replace it with something like this:

    C#/VB.NET Code:
    <table>
        <
    tr>
            <
    td valign="middle" class="pages">
                    <
    xsl:if test="$CurrentPage != 1">    
                        <
    a style="padding-right:3px;" href="{concat($BaseURL,'?pagenum=1')}"><img src="{concat('skins/skin_',aspdnsf:SkinID(),'/images/return_page_btn.png')}" title="Page 1" border="0"/></a>
                    </
    xsl:if>
                    <
    xsl:if test="$CurrentPage &gt; 2">    
                                <
    a href="{concat($BaseURL,'?pagenum=',$CurrentPage - 1)}"><img title="Page {$CurrentPage 1}src="{concat('skins/skin_',aspdnsf:SkinID(),'/images/prev_page_btn.png')}" border="0"/></a>
                    </
    xsl:if>
            </
    td>
            <
    td valign="middle" class="pages">
                    <
    xsl:if test="$CurrentPage - 2 &gt; 0">                                            
                        <
    class="pages" href="{concat($BaseURL,'?pagenum=',$CurrentPage - 2)}"><xsl:value-of select="$CurrentPage - 2" /></a><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>|
                    </
    xsl:if>
                    <
    xsl:if test="$CurrentPage - 1 &gt; 0">                                            
                        <
    class="pages" href="{concat($BaseURL,'?pagenum=',$CurrentPage - 1)}"><xsl:value-of select="$CurrentPage - 1" /></a><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>|
                    </
    xsl:if>

                    <
    span class="currentPage"><xsl:value-of select="$CurrentPage/></span>

                    <
    xsl:if test="$CurrentPage + 1 &lt; $LastPage">                                            
                        |<
    xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text><class="pages" href="{concat($BaseURL,'?pagenum=',$CurrentPage + 1)}"><xsl:value-of select="$CurrentPage + 1" /></a>
                    </
    xsl:if>                                        

                    <
    xsl:if test="$CurrentPage + 2 &lt; $LastPage">                                            
                        |<
    xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text><class="pages" href="{concat($BaseURL,'?pagenum=',$CurrentPage + 2)}"><xsl:value-of select="$CurrentPage + 2" /></a>
                    </
    xsl:if>

                    
    of <class="pages" href="{concat($BaseURL,'?pagenum=',$LastPage)}"><xsl:value-of select="$LastPage/></a>

            </
    td>
            <
    td valign="middle" class="pages">
                    <
    xsl:if test="$CurrentPage != $LastPage">
                        <
    a href="{concat($BaseURL,'?pagenum=',$CurrentPage + 1)}"><img title="Page {$CurrentPage 1}src="{concat('skins/skin_',aspdnsf:SkinID(),'/images/next_page_btn.png')}" border="0"/></a>
                    </
    xsl:if>
            </
    td>
        </
    tr>
    </
    table

    You might need to add the following:

    C#/VB.NET Code:
    <xsl:param name="LastPage" select="/root/Products2/Product/pages" /> 
    towards the top of your XML package where there are a bunch of other <xsl: param ...>, then of course you need to have the graffics for the forward and back and first buttons. This solutions skins well also in case you are using multiple skins.
    Last edited by cdub; 07-16-2009 at 01:36 PM.

  10. #10
    jasont is offline Member
    Join Date
    Jul 2009
    Posts
    36

    Default

    Quote Originally Posted by Darth Rez View Post
    Your web.config file and AjaxPagingControl.cs file possess naming and referencing conflicts.

    Didn't test ....xml.config, but the code in your web/app_code folder has a naming conflict.

    You need a different name for your class in AjaxPagingControl.cs. Change the red class name below to "jasont".

    namespace Mycustom{

    public class AjaxPagingControljasont{

    public string AjaxPagingControl(string sBaseURL, String sPageNum, String sNumPages){

    .
    .
    .



    Alter your web.config file to make available the new class with the following:

    <add name="Mycustom" namespace="urn:Mycustom" type="Mycustom.jasont" />

    Add the urn to the XMLPackage file:

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mynamespace="urn:mynamespace" xmlns:aspdnsfMycustom="urn:Mycustom" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf mynamespace AjaxPagingControl">

    Probably don't need the last red part above flagged with the RedFace.

    With the above changes, you should be able to call the AjaxPagingControl Method/Function from your ....xml.config file as such: <xsl:value-of select="Mycustom:AjaxPagingControl()" disable-output-escaping="yes" />

    Underestimate the DaRkSiDe at your own peril,
    Rez
    .
    Darth -

    I made the changes you gave here and the page loads fine but there is no paging showed at all now. The daPagination.js is in the jscripts folder and the daPagination.css is in the skin folder that we are using. Here is a view of my current xml.config

    Code:
    <?xml version="1.0" standalone="yes" ?>
    <package version="2.1" displayname="Entity Table Expanded 2" debug="false" includeentityhelper="true">
    
        <!-- ###################################################################################################### -->
        <!-- Copyright AspDotNetStorefront.com, 1995-2009.  All Rights Reserved.					                -->
        <!-- http://www.aspdotnetstorefront.com														                -->
        <!-- For details on this license please visit  the product homepage at the URL above.		                -->
        <!-- THE ABOVE NOTICE MUST REMAIN INTACT.                                                                   -->
        <!--                                                                                                        -->
        <!-- ###################################################################################################### -->
    
    
        <query name="Products" rowElementName="Product">
            <sql>
                <![CDATA[
                    exec dbo.aspdnsf_GetProducts 
                        @categoryID = @CatID,
                        @sectionID = @SecID,
                        @manufacturerID = @ManID,
                        @distributorID = @DistID,
                        @genreID = @GenreID,
                        @vectorID = @VectorID,
                        @localeName = @locale,
                        @CustomerLevelID = @CustLevelID,
                        @affiliateID = @AffID,
                        @ProductTypeID = @ProdTypeID, 
                        @ViewType = 1,
                        @pagenum = @pgnum,
                        @pagesize = null,
                        @StatsFirst = 0,
                        @publishedonly = 1,
                        @ExcludePacks = 0,
                        @ExcludeKits = 0,
                        @ExcludeSysProds = 0,
                        @InventoryFilter = @InvFilter,
                        @sortEntityName = @entityname
                ]]>
            </sql>
            <queryparam paramname="@CatID" paramtype="runtime" requestparamname="CatID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@SecID" paramtype="runtime" requestparamname="SecID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@ManID" paramtype="runtime" requestparamname="ManID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@DistID" paramtype="runtime" requestparamname="DistID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@GenreID" paramtype="runtime" requestparamname="GenreID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@VectorID" paramtype="runtime" requestparamname="VectorID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@locale" paramtype="runtime" requestparamname="LocaleSetting" sqlDataType="varchar" defvalue="en-US"  validationpattern="" />
            <queryparam paramname="@CustLevelID" paramtype="runtime" requestparamname="CustomerLevelID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@AffID" paramtype="runtime" requestparamname="AffiliateID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@ProdTypeID" paramtype="runtime" requestparamname="ProductTypeFilterID" sqlDataType="int" defvalue="1"  validationpattern="" />
            <queryparam paramname="@pgnum" paramtype="request" requestparamname="pagenum" sqlDataType="int" defvalue="1"  validationpattern="" />
            <queryparam paramname="@InvFilter" paramtype="appconfig" requestparamname="HideProductsWithLessThanThisInventoryLevel" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@entityname" paramtype="runtime" requestparamname="EntityName" sqlDataType="varchar" defvalue=""  validationpattern="" />
        </query>
    
    
        <PackageTransform>
    
            <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mynamespace="urn:mynamespace" xmlns:Mycustom="urn:Mycustom" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf mynamespace">
                <xsl:output method="html" omit-xml-declaration="yes" />
    			<xsl:param name="LocaleSetting" select="/root/Runtime/LocaleSetting" />
                <xsl:param name="WebConfigLocaleSetting" select="/root/Runtime/WebConfigLocaleSetting" />
                <xsl:param name="ShowSubcatsInGrid">
                    <xsl:value-of select="aspdnsf:AppConfig('ShowSubcatsInGrid')" />
                </xsl:param>
                <xsl:param name="SubcatGridCols">
                    <xsl:value-of select="/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/ColWidth" />
                </xsl:param>
                <xsl:param name="EntityName">
                    <xsl:value-of select="/root/Runtime/EntityName" />
                </xsl:param>
                <xsl:param name="EntityID">
                    <xsl:value-of select="/root/Runtime/EntityID" />
                </xsl:param>
                <xsl:param name="WholesaleOnlySite">
                    <xsl:value-of select="aspdnsf:AppConfig('WholesaleOnlySite')"/>
                </xsl:param>
    
    
                <xsl:param name="BaseURL">
                    <xsl:choose>
                        <xsl:when test="aspdnsf:StrToLower(/root/Runtime/EntityName) = 'category'">c-<xsl:value-of select="/root/Runtime/EntityID" />-<xsl:value-of select="/root/QueryString/sename" />.aspx</xsl:when>
                        <xsl:when test="aspdnsf:StrToLower(/root/Runtime/EntityName) = 'section'">s-<xsl:value-of select="/root/Runtime/EntityID" />-<xsl:value-of select="/root/QueryString/sename" />.aspx</xsl:when>
                        <xsl:when test="aspdnsf:StrToLower(/root/Runtime/EntityName) = 'manufacturer'">m-<xsl:value-of select="/root/Runtime/EntityID" />-<xsl:value-of select="/root/QueryString/sename" />.aspx</xsl:when>
                        <xsl:when test="aspdnsf:StrToLower(/root/Runtime/EntityName) = 'library'">l-<xsl:value-of select="/root/Runtime/EntityID" />-<xsl:value-of select="/root/QueryString/sename" />.aspx</xsl:when>
                    </xsl:choose>
                </xsl:param>
    
                <xsl:param name="CurrentPage">
                    <xsl:choose>
                        <xsl:when test="/root/QueryString/pagenum">
                            <xsl:value-of select="/root/QueryString/pagenum" />
                        </xsl:when>
                        <xsl:otherwise>1</xsl:otherwise>
                    </xsl:choose>
                </xsl:param>
    
    
    
                <xsl:template match="/">
    				<div>
                    <xsl:value-of select="aspdnsf:EntityPageHeaderDescription($EntityName, $EntityID)" disable-output-escaping="yes" />
    				</div>
                    <xsl:value-of select="aspdnsf:EntityPageFilterOptions($EntityName, $EntityID, /root/Runtime/SecID, /root/Runtime/CatID, /root/Runtime/ManID, /root/Runtime/ProductTypeFilterID)" disable-output-escaping="yes" />
                    <xsl:call-template name="SubEntity" />
                    <xsl:choose>
                        <xsl:when test="count(/root/Products/Product) = 0 and count(/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[EntityID=/root/Runtime/EntityID]/Entity) = 0">
                            <xsl:value-of select="aspdnsf:Topic(concat('empty', /root/Runtime/EntityName, 'text'))" disable-output-escaping="yes" />
                        </xsl:when>
                        <xsl:otherwise>
    						<!--<div style="text-align:right;"><xsl:value-of select="aspdnsf:PagingControl($BaseURL, $CurrentPage, /root/Products2/Product/pages)" disable-output-escaping="yes" /></div>-->
    				                <table border="0" cellpadding="0" cellspacing="4" width="100%">
    									<TR>
    										<TD valign="top">
    											<div id="paginate-top" class="navRange"><xsl:value-of select="Mycustom:AjaxPagingControl($BaseURL, $CurrentPage, /root/Products2/Product/pages)" disable-output-escaping="yes" />
    											</div>
    										</TD>
    									</TR>
                                        <xsl:apply-templates select="/root/Products/Product" />
    									<TR>
    										<TD>
    											<div id="paginate-bottom"><xsl:value-of select="Mycustom:AjaxPagingControl($BaseURL, $CurrentPage, /root/Products2/Product/pages)" disable-output-escaping="yes" />
    											</div>
    										</TD>
    									</TR>
    
    								</table>
    						<!--<div style="text-align:right;"><xsl:value-of select="aspdnsf:PagingControl($BaseURL, $CurrentPage, /root/Products2/Product/pages)" disable-output-escaping="yes" /></div>-->
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:template>
    
    
                <xsl:template name="SubEntity">
                    <xsl:for-each select="/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[ParentEntityID=/root/Runtime/EntityID]">
    
                        <xsl:choose>
                            <xsl:when test="$ShowSubcatsInGrid = 'true'">
                                <table border="0" cellpadding="0" cellspacing="4" width="100%">
                                    <xsl:if test="position() mod $SubcatGridCols = 1 or ($SubcatGridCols = 1)">
                                        <tr>
                                            <xsl:for-each select=". | following-sibling::*[position() &lt; $SubcatGridCols]">
                                                <xsl:variable name="scName" select="aspdnsf:GetMLValue(Name)" />
    
                                                <xsl:call-template name="SubCatCell">
                                                    <xsl:with-param name="scName" select="$scName" />
                                                </xsl:call-template>
                                            </xsl:for-each>
                                        </tr>
                                        <tr>
                                            <td height="10" colspan="{$SubcatGridCols}">&#0160;</td>
                                        </tr>
                                    </xsl:if>
                                </table>
                            </xsl:when>
                            <xsl:otherwise>
                                <xsl:variable name="scName" select="aspdnsf:GetMLValue(Name)" />
    
                                <p align="left">
                                    &#0160;&#0160;&#0160;<img border="0" src="{concat('skins/skin_', aspdnsf:SkinID(), '/images/redarrow.gif')}"></img>&#0160;
                                    <a href="{aspdnsf:EntityLink(EntityID, SEName, $EntityName, 0, '')}">
                                        <xsl:value-of select="$scName" disable-output-escaping="yes"/>
                                    </a>
                                </p>
                            </xsl:otherwise>
                        </xsl:choose>
                    </xsl:for-each>
                </xsl:template>
    
    
                <xsl:template name="SubCatCell">
                    <xsl:param name="scName"></xsl:param>
                    <xsl:param name="pSEAltText" select="aspdnsf:GetMLValue(SEAltText)"></xsl:param>
                    <xsl:param name="AltText">
                        <xsl:choose>
                            <xsl:when test="$pSEAltText=''"><xsl:value-of select="$scName" /></xsl:when>
                            <xsl:otherwise><xsl:value-of select="$pSEAltText" /></xsl:otherwise>
                        </xsl:choose>
                    </xsl:param>
    
    
                    <xsl:param name="URL">
                        <xsl:value-of select="aspdnsf:EntityLink(EntityID, SEName, $EntityName, 0, '')" />
                    </xsl:param>
    
                    <td align="center">
                        <a href="{$URL}">
                            <xsl:value-of select="aspdnsf:LookupEntityImage(EntityID, $EntityName, 'icon', 0, $AltText)" disable-output-escaping="yes" />
                        </a>
                        <br/>
                        <a href="{$URL}">
                            <xsl:value-of select="$scName" disable-output-escaping="yes"/>
                        </a>
                    </td>
    
                </xsl:template>
    
    
                <xsl:template match="Product">
                    <xsl:param name="pName" select="aspdnsf:GetMLValue(Name)"></xsl:param>
                    <xsl:param name="pDescription" select="aspdnsf:GetMLValue(Description)"></xsl:param>
                    <xsl:param name="pSalesPromptName" select="aspdnsf:GetMLValue(SalesPromptName)"></xsl:param>
                    <xsl:param name="pSEAltText" select="aspdnsf:GetMLValue(SEAltText)"></xsl:param>
                    <xsl:param name="AltText">
                        <xsl:choose>
                            <xsl:when test="$pSEAltText=''"><xsl:value-of select="$pName" /></xsl:when>
                            <xsl:otherwise><xsl:value-of select="$pSEAltText" /></xsl:otherwise>
                        </xsl:choose>
                    </xsl:param>
    
    
                    <xsl:param name="URL">
                        <xsl:value-of select="aspdnsf:ProductandEntityLink(ProductID, SEName, $EntityID, $EntityName, 0)" disable-output-escaping="yes" />
                    </xsl:param>
                    <tr>
                        <td>
                            <table width="100%" cellpadding="0" cellspacing="0" border="0" >
                                <tr>
                                    <td width="10%" align="left" valign="top" style="padding-right:10px;">
                                        <a href="{$URL}">
                                            <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFileNameOverride, SKU, 'icon', 0, $AltText)" disable-output-escaping="yes" />
                                        </a>
                                    </td>
                                    <td valign="top" align="left">
                                        <table width="100%" cellpadding="1" cellspacing="0" border="0">
                                            <tr>
                                                <td class="ProductNameText" align="left" valign="top">
                                                    <a href="{$URL}">
    													<xsl:value-of select="(concat(ManufacturerName,'&#160;',$pName))" disable-output-escaping="yes"/>
                                                        <!--<xsl:value-of select="$pName" disable-output-escaping="yes"/>-->
                                                    </a>
                                                </td>
                                            </tr>
                                            <!--<tr>
                                                <td align="left" valign="top">
                                                    <xsl:value-of select="$pDescription" disable-output-escaping="yes" />
                                                </td>
                                            </tr>-->
                                            <tr>
                                                <td height="20">&#0160;</td>
                                            </tr>
    										<tr>
    											<td align="left" valign="top">
    												<xsl:value-of select="aspdnsf:StringResource(concat('show', $EntityName, '.aspx.50'), $LocaleSetting)" disable-output-escaping="yes" />
    												<xsl:value-of select="ManufacturerName" />
    											</td>
    										</tr>
    										<tr>
    											<td align="left" valign="top">
    												<xsl:value-of select="aspdnsf:StringResource(concat('show', $EntityName, '.aspx.51'), $LocaleSetting)" disable-output-escaping="yes" />
    												<xsl:value-of select="ManufacturerPartNumber" />
    											</td>
    										</tr>
                                            <tr>
                                                <td align="left" valign="top">
                                                    <xsl:value-of select="aspdnsf:StringResource(concat('show', $EntityName, '.aspx.29'), $LocaleSetting)" disable-output-escaping="yes" />
                                                    <xsl:value-of select="SKU" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left" valign="top">
                                                    <xsl:choose>
                                                        <xsl:when test="MiscText = 'SHOW INVENTORY'">
                                                            <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.20')" disable-output-escaping="yes" />
                                                            <xsl:value-of select="Inventory" />
                                                        </xsl:when>
                                                        <xsl:otherwise>
                                                            <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.21')" disable-output-escaping="yes" /> 
                                                            <xsl:choose>
                                                                <xsl:when test="number(Inventory)>0">
                                                                    <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.5')" disable-output-escaping="yes" />
                                                                </xsl:when>
                                                                <xsl:otherwise>
                                                                    <xsl:value-of select="aspdnsf:StringResource('searchadv.aspx.6')" disable-output-escaping="yes" />
                                                                </xsl:otherwise>
                                                            </xsl:choose>
                                                        </xsl:otherwise>
                                                    </xsl:choose>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left" valign="bottom">
                                                    <xsl:value-of select="aspdnsf:GetVariantPrice(VariantID, number(HidePriceUntilCart), Price, SalePrice, ExtendedPrice, Points, $pSalesPromptName, TaxClassID)" disable-output-escaping="yes" />
                                                </td>
                                            </tr>
    										<tr>
    											<td align="left" valign="bottom">
    												<xsl:if test="aspdnsf:AppConfigBool('DisplayOutOfStockProducts') = 'true'">
    															<xsl:value-of select="aspdnsf:DisplayProductStockHint(ProductID, VariantID,'Entity')" disable-output-escaping="yes" />													
    												</xsl:if>
    											</td>
    										</tr>
                                            <tr>
                                                <td height="20">&#0160;</td>
                                            </tr>
                                            <tr>
    											<td align="left" valign="bottom">
    											<xsl:choose>
    												<xsl:when test="IsAKit = 1 or IsAPack = 1">
    													<a href="{$URL}">
    														<img style="cursor:hand;" border="0" src="{concat('skins/skin_', aspdnsf:SkinID(), '/images/moreinfo.gif')}" alt="{aspdnsf:StringResource('image.altText.14', $LocaleSetting)}"></img>
    													</a>
    												</xsl:when>
    												<xsl:otherwise>
    													<xsl:value-of select="aspdnsf:AddtoCartForm(ProductID, VariantID, 0, 'left')" disable-output-escaping="yes" />
    												</xsl:otherwise>
    											</xsl:choose>
    
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="15">
                            <hr size="1" />
                        </td>
                    </tr>
                </xsl:template>
    
    
            </xsl:stylesheet>
        </PackageTransform>
    </package>
    Any thoughts as to why the paging will not show at all now? when you view the page source through Firefox or IE you can see that it creates the paging array but it is just not viewable.

  11. #11
    Darth Rez is offline Junior Member
    Join Date
    Mar 2009
    Location
    Southern California
    Posts
    7

    Default

    Looking at the AjaxPagingControl.cs file:

    tmpS.Append("var daBook = new ajaxpageclass.createBook(daPages, \"pcontent\", [\"paginate-top\",\"paginate-bottom\"]);");

    When we create the book we pass the ID's of the <DIV> tags that act as place holders for pagination rendering. This implies that you should call the AjaxPagingControl() only once.

    <xsltherwise>
    <table border="0" cellpadding="0" cellspacing="4" width="100%">
    <TR>
    <TD valign="top"><div id="paginate-top" class="navRange"> </div></TD>
    </TR>
    <xsl:apply-templates select="/root/Products/Product" />
    <TR>
    <TD><div id="paginate-bottom"> </div></TD>
    </TR>
    </table>
    <xsl:value-of select="Mycustom:AjaxPagingControl($BaseURL, $CurrentPage, /root/Products2/Product/pages)" disable-output-escaping="yes" />
    </xsltherwise>

    You may want to put the red section above in a valid HTML element as it's currently placed within daVoid.

    Make sure that you reference the daPagination.js file in your template.ascx file within the relevant SKIN_# folder.

    <script type="text/javascript" src="jscripts/daPagination.js"></script>

    Look at the source of daPagination.js file and make sure that the daPagination.css file is correctly placed and linked on the first line of the .JS file.

    document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"skins/Skin_1/daPagination.css\" />");

  12. #12
    Alkaline is offline Senior Member
    Join Date
    May 2006
    Posts
    459

    Default

    Paging with Buffers works pretty good too:

    http://www.visioninstyle.com/c-93-sunglasses.aspx

    e.g. Click page 7, you get 3 pages and ahead and the 3 pages behind.
    Simrun AspDotNetStoreFront Development
    Preferred AspDotnetStorefront Development Partner
    ahsan[@]simrun[.]com
    remove the "[]" for email

    Have a Nice Day

  13. #13
    metroplextrading is offline Junior Member
    Join Date
    Dec 2010
    Posts
    1

    Default Paging with Buffers

    Hey Alkaline. Any chance you can show me how to do the paging with buffers. I have around 60K products on my site and have some very ugly pages as a result. I appreciate any help you can provide.