एएसपी ट्यूटोरियल

एएसपी होम

WP ट्यूटोरियल

वेबपेज परिचय वेबपेज रेजर वेबपेज लेआउट वेबपेज फोल्डर वेबपेज ग्लोबल वेबपेज फॉर्म वेबपेज ऑब्जेक्ट्स वेबपेज फ़ाइलें वेबपेज डेटाबेस वेबपेज हेल्पर्स वेबपेज वेबग्रिड वेबपेज चार्ट वेबपेज ईमेल वेबपेज सुरक्षा वेबपेज प्रकाशित वेबपेज उदाहरण वेबपेज कक्षाएं

ASP.NET रेजर

रेजर इंट्रो रेजर सिंटेक्स रेजर सी # चर रेजर सी # लूप्स रेजर सी # लॉजिक रेजर वीबी चर रेजर वीबी लूप्स रेजर वीबी लॉजिक

एएसपी क्लासिक

एएसपी परिचय एएसपी सिंटेक्स एएसपी चर एएसपी प्रक्रियाएं एएसपी सशर्त एएसपी लूपिंग एएसपी फॉर्म एएसपी कुकीज़ एएसपी सत्र एएसपी आवेदन एएसपी #शामिल करें एएसपी Global.asa एएसपी अजाक्स एएसपी ई-मेल एएसपी उदाहरण

एएसपी संदर्भ

एएसपी वीबी कार्य एएसपी वीबी कीवर्ड एएसपी प्रतिक्रिया एएसपी अनुरोध एएसपी आवेदन एएसपी सत्र एएसपी सर्वर एएसपी त्रुटि एएसपी फाइल सिस्टम एएसपी टेक्स्टस्ट्रीम एएसपी ड्राइव एएसपी फ़ाइल एएसपी फ़ोल्डर एएसपी डिक्शनरी एएसपी एडरोटेटर एएसपी ब्राउज़र कैप एएसपी सामग्री लिंकिंग एएसपी सामग्री रोटेटर एएसपी त्वरित रेफरी

एडीओ ट्यूटोरियल

एडीओ परिचय एडीओ कनेक्ट एडीओ रिकॉर्डसेट एडीओ प्रदर्शन एडीओ क्वेरी एडीओ सॉर्ट एडीओ जोड़ें एडीओ अपडेट एडीओ हटाएं एडीओ डेमो एडीओ स्पीड अप

एडीओ ऑब्जेक्ट्स

एडीओ कमांड एडीओ कनेक्शन एडीओ त्रुटि एडीओ फील्ड एडीओ पैरामीटर एडीओ संपत्ति एडीओ रिकॉर्ड एडीओ रिकॉर्डसेट एडीओ स्ट्रीम एडीओ डेटा प्रकार

एएसपी सामग्री लिंकिंग घटक


और ज्यादा उदाहरण


की एक तालिका बनाएँ।


टेक्स्ट फ़ाइल में पृष्ठों के बीच नेविगेट करने के लिए सामग्री लिंकिंग घटक का उपयोग करें।


एएसपी सामग्री लिंकिंग घटक

ASP सामग्री लिंकिंग घटक का उपयोग त्वरित और आसान नेविगेशन सिस्टम बनाने के लिए किया जाता है!

सामग्री लिंकिंग घटक एक नेक्स्टलिंक ऑब्जेक्ट देता है जिसका उपयोग नेविगेट किए जाने वाले वेब पेजों की सूची रखने के लिए किया जाता है।

वाक्य - विन्यास

<%
Set nl=Server.CreateObject("MSWC.NextLink")
%>

एएसपी सामग्री लिंकिंग उदाहरण

सबसे पहले हम एक टेक्स्ट फाइल बनाते हैं - "links.txt":

asp_intro.asp ASP Intro
asp_syntax.asp ASP Syntax
asp_variables.asp ASP Variables
asp_procedures.asp ASP Procedures

ऊपर दी गई टेक्स्ट फ़ाइल में नेविगेट किए जाने वाले पृष्ठ हैं। पृष्ठों को उसी क्रम में सूचीबद्ध किया जाना चाहिए जिस क्रम में आप उन्हें प्रदर्शित करना चाहते हैं, और इसमें प्रत्येक फ़ाइल नाम के लिए एक विवरण भी होना चाहिए (फ़ाइल नाम को विवरण से अलग करने के लिए टैब कुंजी का उपयोग करें)।

नोट: यदि आप कोई पृष्ठ जोड़ना चाहते हैं, या सूची में पृष्ठों का क्रम बदलना चाहते हैं; आपको केवल टेक्स्ट फ़ाइल को संशोधित करना है! नेविगेशन अपने आप ठीक हो जाएगा!

फिर हम एक सम्मिलित फ़ाइल बनाते हैं, "nlcode.inc"। .inc फ़ाइल "links.txt" में सूचीबद्ध पृष्ठों के बीच नेविगेट करने के लिए एक नेक्स्टलिंक ऑब्जेक्ट बनाती है।

"nlcode.inc":

<%
dim nl
Set nl=Server.CreateObject("MSWC.NextLink")
if (nl.GetListIndex("links.txt")>1) then
  Response.Write("<a href='" & nl.GetPreviousURL("links.txt"))
  Response.Write("'>Previous Page</a>")
end if
Response.Write("<a href='" & nl.GetNextURL("links.txt"))
Response.Write("'>Next Page</a>")
%>

टेक्स्ट फ़ाइल "links.txt" में सूचीबद्ध प्रत्येक .asp पेज में कोड की एक लाइन डालें: <!-- #include file="nlcode.inc"-->इस लाइन में "links.txt" में सूचीबद्ध प्रत्येक पृष्ठ पर "nlcode.inc" में कोड शामिल होगा और नेविगेशन काम करेगा।



ASP सामग्री लिंकिंग घटक के तरीके

Method Description Example
GetListCount Returns the number of items listed in the Content Linking List file <%
dim nl,c
Set nl=Server.CreateObject("MSWC.NextLink")
c=nl.GetListCount("links.txt")
Response.Write("There are ")
Response.Write(c)
Response.Write(" items in the list")
%>

Output:

There are 4 items in the list

GetListIndex Returns the index number of the current item in the Content Linking List file. The index number of the first item is 1. 0 is returned if the current page is not in the Content Linking List file <%
dim nl,c
Set nl=Server.CreateObject("MSWC.NextLink")
c=nl.GetListIndex("links.txt")
Response.Write("Item number ")
Response.Write(c)
%>

Output:

Item number 3

GetNextDescription Returns the text description of the next item listed in the Content Linking List file. If the current page is not found in the list file it returns the text description of the last page on the list <%
dim nl,c
Set nl=Server.CreateObject("MSWC.NextLink")
c=nl.GetNextDescription("links.txt")
Response.Write("Next ")
Response.Write("description is: ")
Response.Write(c)
%>

Next description is: ASP Variables

GetNextURL Returns the URL of the next item listed in the Content Linking List file. If the current page is not found in the list file it returns the URL of the last page on the list <%
dim nl,c
Set nl=Server.CreateObject("MSWC.NextLink")
c=nl.GetNextURL("links.txt")
Response.Write("Next ")
Response.Write("URL is: ")
Response.Write(c)
%>

Next URL is: asp_variables.asp

GetNthDescription Returns the description of the Nth page listed in the Content Linking List file <%
dim nl,c
Set nl=Server.CreateObject("MSWC.NextLink")
c=nl.GetNthDescription("links.txt",3)
Response.Write("Third ")
Response.Write("description is: ")
Response.Write(c)
%>

Third description is: ASP Variables

GetNthURL Returns the URL of the Nth page listed in the Content Linking List file <%
dim nl,c
Set nl=Server.CreateObject("MSWC.NextLink")
c=nl.GetNthURL("links.txt",3)
Response.Write("Third ")
Response.Write("URL is: ")
Response.Write(c)
%>

Third URL is: asp_variables.asp

GetPreviousDescription Returns the text description of the previous item listed in the Content Linking List file. If the current page is not found in the list file it returns the text description of the first page on the list <%
dim nl,c
Set nl=Server.CreateObject("MSWC.NextLink")
c=nl.GetPreviousDescription("links.txt")
Response.Write("Previous ")
Response.Write("description is: ")
Response.Write(c)
%>

Previous description is: ASP Variables

GetPreviousURL Returns the URL of the previous item listed in the Content Linking List file. If the current page is not found in the list file it returns the URL of the first page on the list <%
dim nl,c
Set nl=Server.CreateObject("MSWC.NextLink")
c=nl.GetPreviousURL("links.txt")
Response.Write("Previous ")
Response.Write("URL is: ")
Response.Write(c)
%>

Previous URL is: asp_variables.asp