Previous PageNext Page

10.5.2 General Example

The following example builds a table of contents.
 

      <OL>
      <%
      Set NextLink = Server.CreateObject ("MSWC.NextLink")
      count = NextLink.GetListCount ("/data/nextlink.txt")
      I = 1
      %>

      <UL>
      <% Do While (I <= count) %>
      <LI><A HREF=" <%= NextLink.GetNthURL ("/data/nextlink.txt", I) %> ">
      <%= NextLink.GetNthDescription ("/data/nextlink.txt", I) %> </A>
      <%
      I = (I + 1)
      Loop
      %>
      </UL>

      </OL>

The following script adds the next-page and previous-page buttons to an HTML file.
 

      <%
      Set NextLink = Server.CreateObject ("MSWC.NextLink")
      If (NextLink.GetListIndex ("/data/nextlink.txt") > 1)
      Then
      %>

      <A HREF=" <%= NextLink.GetPreviousURL ("/data/nextlink.txt") %> ">

      Previous Page</A>
      <% End If %>
      <A HREF=" <%= NextLink.GetNextURL ("/data/nextlink.txt") %> ">Next Page</A>


Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page