### GetPreviousURL

The GetPreviousURL method returns the URL of the previous item in the Content Linking List file.

###### Syntax

NextLink.GetPreviousURL( listURL )

###### Parameters

listURL
  The location of the Content Linking List file.

###### Return Values

This method returns a string containing the URL of the previous item in the Content Linking List file. If the current page is not specified in the Content Linking List file, GetPreviousURL returns the URL of the first page in the file.

###### Example

A more complete example is at the bottom of Content Linking Component.

--- NextLink_GetPreviousURL.asp ---

    <%
      ListFile = "/Data/NextLink.txt"
      Set objNextLink = Server.CreateObject("MSWC.NextLink")
      PreviousPageURL = objNextLink.GetPreviousURL(ListFile)
      ThisPageIndex = objNextLink.GetListIndex(ListFile)
      If 0 = ThisPageIndex Then
        Response.Write "This page is not listed in your Content Linking List file.<BR>"
      ElseIf ThisPageIndex > 1 Then
        Response.Write "The URL of the previous page is<BR>"
        %><A HREF="<%=PreviousPageURL%>"><%=PreviousPageURL%></A><%
      Else
        Response.Write "You are already at the beginning of the list.<BR>"
      End If
    %>

###### See Also

GetNextURL, GetNthURL, GetPreviousDescription.

© 1997-2001 Microsoft Corporation. All rights reserved.