celalo 0 Newbie Poster

Hello, I was wondering if you can't use the content linker component with request.querystring urls. Here's the problem I have:

I have 1 product detail page (bbowl_dt.asp) which shows different products according to the product id (phoid) clicked on the parent page. I want next and previous links below the product photo. The bbowl_dt.asp is partly as below:

<%
dim phoid, phSrc, PageNext, PagePrev, ListCount, ListIndex,objNL, currentURL
phoid = request.QueryString("pid")
phSrc = "../img/full/DSC_" & phoid & ".jpg"
set objNL = Server.CreateObject("MSWC.NextLink")
PageNext = objNL.GetNextURL("cl_bbowl.txt")
PagePrev = objNL.GetPreviousURL("cl_bbowl.txt")
ListCount = objNL.GetListCount("cl_bbowl.txt")
ListIndex = objNL.GetListIndex("cl_bbowl.txt")

select case phoid
    case "7142"
        cat = "............"
        size1 = "............"
        size2 = "............"
        size3 = "............"
    case "7145"
        cat = "............"
        size1 = "............"
        size2 = "............"
        size3 = "............"
    case "7143"
        cat = "............"
        size1 = "............"
        size2 = "............"
        size3 = "............"
   .
   .
   .
end select
%>
<table width="100%">
    <tr>
        <td colspan="2" width="50%"><div align="center"><img src="<%=phSrc%>" /></div></td>
        <td width="50%">
            <p>Product: <%=cat%></p>
            <p>
                <%=size1%><br />
                <%=size2%><br />
                <%=size3%>
            </p>
        </td>
    </tr>
    <tr>
        <td align="center" width="25%">
        <a href="<%=PagePrev%>"><img src="../img/left1.gif" alt="Previous" /></a><br />Previous</td>
        <td align="center" width="25%"><img src="../img/right1.gif" alt="Next" /><br />Next</td>
    </tr>
</table>

For debugging purposes, I have the following below the table:

<%
response.write("ListIndex: " & ListIndex & " ListCount: " & ListCount & "<br />PagePrev: " & PagePrev & " PageNext: " & PageNext)
%>

The index file cl_bbowl.txt is like below:

bbowl_dt.asp?pid=7142    7142
bbowl_dt.asp?pid=7143    7143
bbowl_dt.asp?pid=7135    7135
bbowl_dt.asp?pid=7145    7145
bbowl_dt.asp?pid=7151    7151
bbowl_dt.asp?pid=7134    7134
bbowl_dt.asp?pid=7165    7165
bbowl_dt.asp?pid=7166    7166
bbowl_dt.asp?pid=7146    7146
bbowl_dt.asp?pid=7167    7167
bbowl_dt.asp?pid=7164    7164
bbowl_dt.asp?pid=7160    7160
bbowl_dt.asp?pid=7157    7157
bbowl_dt.asp?pid=7162    7162
bbowl_dt.asp?pid=7158    7158
bbowl_dt.asp?pid=7153    7153
bbowl_dt.asp?pid=3800    3800
bbowl_dt.asp?pid=2053    2053
bbowl_dt.asp?pid=2058    2058
bbowl_dt.asp?pid=3809    3809
bbowl_dt.asp?pid=3793    3793
bbowl_dt.asp?pid=7133    7133
bbowl_dt.asp?pid=3813    3813

Problem is, whichever product page I'm in, the ListIndex shows 0, ListCount is correct (23), PagePrev is always the first product (bbowl_dt.asp?pid=7142) and PageNext is always the last product (bbowl_dt.asp?pid=3813). I was wondering if this is because I am using Request.QueryString("pid") to get the product or am I doing something else wrong. Are there any workarounds??

Thanks in advance for your feedback and assistance

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.