Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 11th, 2005, 11:30 PM
Registered User
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default How to display tree view in asp.

Can anyonw let me know how to display tree-view [just like Windows Explorer] in asp?

Old July 11th, 2005, 11:48 PM
Friend of Wrox
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41

Did you try searching for 'folder tree' in this forum? The link you want is in this post:

I have used and continue to use this brilliant piece of code.

Wind is your friend
Old July 14th, 2005, 04:23 AM
Authorized User
Join Date: Dec 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts

<script language=javascript>
    function radioselect(rid)

<form name=f1>
<%dim con,rs,i,level1
dim radval
set con=server.CreateObject ("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
'set rs1=server.CreateObject("adodb.recordset")

con.Open "Driver=Sql Server;Server=Astrodev;uid=sa;pwd=sa;Database=Spcf "
'Response.Write con
rs.Open "Select * from links_test where parentlink=0",con,3,3
'Response.Write rs.RecordCount
if not rs.EOF then

    'while not rs.EOF
        'Response.Write rs(1) & "<br>"

        display rs("LinkNAME"),rs("LinkID")
end if
    Response.Write "<table border=0><tr>"

function display(parentname,parentid)
        Dim rs1

            set rs1=server.CreateObject("adodb.recordset")

        rs1.Open "Select * from links_test where parentlink=" & parentid & " order by sortorder",con,3,3

        while not rs1.EOF


                                        <td><input type=radio name=r1 align=right></td>
                                        <td align=left><%=rs1("linkname")%></td>
                                    <td><%display rs1("linkname"),rs1("linkid")%></td>


<% rs1.MoveNext
        set rs1=nothing

end function
    Response.Write "</table>"




Similar Threads
Thread Thread Starter Forum Replies Last Post
Tree View dotnetDeveloper ASP.NET 3.5 Basics 1 November 26th, 2008 05:05 PM
Tree View mistry_bhavin ASP.NET 1.x and 2.0 Application Design 1 August 3rd, 2005 03:58 PM
Requires a Tree view code in asp suniltpatel79 Classic ASP Basics 0 June 16th, 2005 11:17 PM
Fill Tree View Recursive And Display Right To Left favaedi BOOK: ASP.NET Website Programming Problem-Design-Solution 1 November 24th, 2004 02:36 PM
tree view msrnivas .NET Web Services 0 February 23rd, 2004 07:04 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.