Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Components
| Search | Today's Posts | Mark Forums Read
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components 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
  #1 (permalink)  
Old August 26th, 2009, 02:28 AM
Registered User
 
Join Date: Jun 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using Content Linking (NextLink) Component with querystrings

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:
Code:
<%
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:
Code:
<%
response.write("ListIndex: " & ListIndex & " ListCount: " & ListCount & "<br />PagePrev: " & PagePrev & " PageNext: " & PageNext)
%>
The index file cl_bbowl.txt is like below:
Code:
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Querystrings butchered abq23 Classic ASP Professional 2 April 7th, 2006 08:22 AM
Multiple Selects in SQL QueryStrings doonman BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 6 January 30th, 2006 07:01 AM
querystrings in chapter 8 LL BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 November 19th, 2003 10:36 AM
Querystrings and Redirects hcweb Classic ASP Basics 3 July 30th, 2003 08:50 AM
Querystrings to Variables hcweb Classic ASP Basics 1 June 14th, 2003 06:54 PM





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