Some of the previously collected data---How to use ASP to implement the Web site's "Directory Tree" management
Source: Internet
Author: User
Using ASP to implement a Web site's directory tree
Originally wanted to translate some things out of, but recently more and more busy, later I try to paste more
The short code comes out, the translation is more and more empty to complete. Oh.
Database structure (two tables used altogether)
1. Tblcategory
Field Name Type
Root binary description tree off or on (root of directory)
ID Auto Number keyword
The sort integer identifies the integer of the field's contents (if Root is on state sort 0) indicating the order of the displayed directories
The Name text (255) can contain identifiers in HTML
HREF text (255) allows null
2. Tblpages
ID Auto Number
Sort integer keyword
Name text (255)
HREF text (255)
3.default.htm
<title>javascript Tree Control template</title>
<frameset cols= "210,*" >
<frame src= "tree.asp" name= "TOC" >
? <frame src= "main.htm" name= "Basefrm" >
</frameset>
4.main.htm
<body>
</body>
5.tree.asp
Set conn = Server.CreateObject ("ADODB. Connection ")
Set Rs = Server.CreateObject ("ADODB.") Recordset ")
Conn.Open "Driver=microsoft Access DRIVER (*.mdb);D bq=" & Server.MapPath ("Toc.mdb")
strSQL = "Select Tblcategory.root, Tblcategory. [ID], tblcategory.sort as Catsort, Tblpages.sort as Linksort, Tblcategory. [Name] As CatName, tblcategory.href as Caturl, Tblpages. [Name] As Linkname, tblpages.href as Linkurl from Tblcategory left JOIN tblpages on Tblcategory. [ID] = tblpages. [ID] ORDER by Tblcategory.root ASC, Tblcategory.sort, Tblpages.sort "
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.