Name
GetNthURL —
objNextLink
.
GetNthURL(
strContentLinkList, intItemIndex
)
Synopsis
Returns a string containing the URL for the item in the Nth position (on the Nth line) in the Content Linking list.
Parameters
-
strContentLinkList A string value representing the virtual or relative pathname and filename of your Content Linking file. You cannot use physical paths or absolute URLs (those beginning with http://, //, or \\) for this parameter.
-
intItemIndex The index of the item in the Content Linking list whose URL you wish to retrieve. This is an integer parameter.
Example
<%
' Dimension local variables.
Dim objNextLink
Dim intTotalCount
Dim intCounter
' Instantiate a NextLink object for this script.
Set objNextLink = Server.CreateObject("MSWC.NextLink")
' Retrieve a total count of items in the Content
' Linking file.
intTotalCount = _
objNextLink.GetListCount("/MyContentList.TXT")
' Iterate through all the items in the Content Linking
' list and generate an entry in an ordered list.
%>
<OL>
<UL>
<%
For intCounter = 1 to intTotalCount
%>
<LI>
<!-- Create a hyperlink to the URL for the current -->
<!-- item in the list. -->
<a href ="<%=
objNextLink.GetNthURL("/MyContentList.TXT", _
intCounter)%>">
<!-- Retrieve the text description for that URL. -->
objNextLink.GetNthDescription("/MyContentList.TXT", _
intCounter)
</LI>
<%
Next
%>
</UL>
</OL>
<%
' Release the memory held for the NextLink object.
Set objNextLink = Nothing
%>Notes
If there is not an item in the position indicated by the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access