MSWC. How to use Nextlink

Source: Internet
Author: User
Tags format count ming
MSWC uses the Content linking component in the Open-source public to manage hypertext links between Web pages and Web sites through a linear list of ordered lists. If you have doubts about this explanation, look here, I do not have a link yo.
Source. Code

The first step is the text file of the sequence description of the content link, which is "the linear order file of the Web page or URL"
(Content linking List file), look at the listing files.
Second Step home Embedded program
‹%
Set mylink=server.createobject ("MSWC. Nextlink ")
File= "List.txt"
Count=mylink.getlistcount (file)

For I=1 to Count
Url=mylink.getnthurl (File,i)
Description=mylink.getnthdescription (File,i)
%›
‹a href= "‹%=url%›" ›%=description%›‹/a›
‹% Next%›s


Step three each page inserts the procedure
‹%
Set mylink=server.createobject ("MSWC. Nextlink ")
File= "List.txt"
Count=mylink.getlistcount (file)

If Mylink.getlistindex (file) >1 Then
Response.Write "‹a href=" & Mylink.getpreviousurl (file) & ">" _
& "Previous" & "‹/a›"
End If
If Mylink.getlistindex (file) ‹count-1 Then
Response.Write "‹a href=" & Mylink.getnexturl (file) & ">" _
& "Next" & "‹/a›"
End If
Response.Write "‹a href=" & Mylink.getnthurl (File,count) & ">" _
& "Source Home" & "‹/a›"
%›

Say, Ming.

The Content linking List File format is divided into three columns, and the columns must be separated by [Tab].
URL of Web page or URL [descriptive text [additional description]]
The URL parameter of a Web page or URL indicates the page or URL to which you want to link, and the relative, absolute path is OK.
The description text parameter is the descriptive text that is displayed to the user.
Additional specification parameters are not displayed to the user, only annotations.
The Content linking component is an important component built into the ASP, and the syntax for establishing the component is:
Set objectname=server.createobject ("MSWC. Nextlink ")

Description of component methods for Content linking
Method Format Description
GetListCount Int = getlistcount (*.txt) page count
GetListIndex Int = GetListIndex (*.txt) The order value of the current page
GetNthURL string = GetNthURL (*.txt, I) specifies the address of the location page
GetNthDescription string = getnthdescription (*.txt, i) specifies the description of the location page
GetNextURL string = GetNextURL (*.txt) address of the next page
GetNextDescription string = getnextdescription (*.txt) Description of the next page
GetPreviousURL string = Gepreviousturl (*.txt) Address of previous page
GetPreviousDescription string = getpreviousdescription (*.txt) Description of previous page

Note. meaning
1 list file in the order of the records, note that this program is the home page position at the end, the cycle start and the number of times will
So different.
2 GetNthURL and GetNthDescription method is to obtain the address or description of the specified location page, the home is displayed
All records, so you use a loop function.
3 Do you notice that the title description in IE browsing window is the theme of the page? Statement, I am a very lazy person, will not article by article
The link. Here we use the GetListIndex and GetNthDescription methods, and compare the methods in the above table.
Ming you will understand.
‹%
List=mylink.getlistindex (file)
Title=mylink.getnthdescription (File,list)
%›
‹title›‹% =title%›‹/title›



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.