468,103 Members | 1,318 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,103 developers. It's quick & easy.

linking content asp

229 100+
Hi,
I have set up a next navigation with this code

Expand|Select|Wrap|Line Numbers
  1. <% Set NextLink = Server.CreateObject ("MSWC.NextLink") %> 
  2.  
  3. <A HREF="<%= NextLink.GetNextURL ("/links.txt") %>">Next Page </A>
and a .txt file like so

Expand|Select|Wrap|Line Numbers
  1. submit2.asp    
  2. directoryaaaa.asp?categoryid=1
  3. websitedesign2.asp    
It works fine, but when I add categories like so

Expand|Select|Wrap|Line Numbers
  1. directoryaaaa.asp?categoryid=1
  2. directoryaaaa.asp?categoryid=2
  3. directoryaaaa.asp?categoryid=3
which is what I really want to do, that is have a next navigation through my database generated categories, it doesnt work. If I add more than one category it leaps from the first to the last and then stops there, and doesnt continue through any more pages.

Anyone know what might be causing this, some conflict with other asp code on the page concerned, like QueryString or intRecord. (It does include a lot more asp code)?

Anyone know a better way, although I have tried several methods I have found on the internet they all come unstuck with the same problem.
Any help would be greatly appreciated.
Thanks
Richard
Sep 7 '07 #1
5 1538
fran7
229 100+
Hi there, Really hope someone can help.

Anyone know how to make the adjustments to this so that it gets the next url,
GetNextURL. This one writes the all the links to the page from the links.txt. I need just a next link that fetches the next url to navigate.


Expand|Select|Wrap|Line Numbers
  1. <% 
  2. dim a 
  3. dim b 
  4. set nl=server.createobject("MSWC.Nextlink") 
  5. a = nl.GetListCount("link\links.txt") 
  6. b = 1 
  7. %> 
  8. <ul> 
  9. <%do while (b <= a) %> 
  10. <li><a href="<%=nl.GetNthURL("link\links.txt", b)%>"> 
  11. <%=nl.GetNthDescription("link\links.txt", b)%></a> 
  12. <% 
  13. b = (b + 1) 
  14. loop 
  15. %>
Thanks for any help.
Richard
Sep 8 '07 #2
markrawlingson
346 Expert 100+
Hi Richard,

This resource may be helpful to you: GetNextURL

It explains all of NextLink's methods and how to use them, including the GetNextURL method.
Sep 8 '07 #3
fran7
229 100+
Thanks, Thats just what I wanted.
Richard
Sep 9 '07 #4
fran7
229 100+
Hi, Anyone any idea why this content linking, reads the first entry in the links.txt file, and the last and skips all the database generated pages in between. Then gets stuck on the last one and goes no further.

There is no problem with the syntax as I have tried 5 different versions of the code and they all stop working with the database categories. It works fine when they are just normal static pages.


Expand|Select|Wrap|Line Numbers
  1.     <% Set NextLink = server.createobject ("MSWC.Nextlink") %>      
  2. <%= NextLink.GetNextURL ("\peter.txt") %>
Expand|Select|Wrap|Line Numbers
  1. /peter.asp?categoryid=1    ttttt
  2. /peter.asp?categoryid=2    yyyyy
  3. /peter.asp?categoryid=4    rrrrrr
  4. /peter.asp?categoryid=3    xxxxx
  5. /peter.asp?categoryid=5    ppppp
The categories load fine when in a normal menu.

This is driving me mad.
Thanks
Richard
Sep 10 '07 #5
jhardman
3,405 Expert 2GB
no, I have no idea. Please stop starting new threads to ask the same question over and over again. I have merged three of your threads. Don't start a new thread unless you are asking a new question. A better way to get a response is to PM an expert and ask him to look into your post.

MODERATOR
Sep 11 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by George Hernandez | last post: by
1 post views Thread by Mike | last post: by
3 posts views Thread by Headless | last post: by
15 posts views Thread by Rob Ratcliff | last post: by
4 posts views Thread by Gary Hughes | last post: by
reply views Thread by nachitas | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.