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
Default

Did you try searching for 'folder tree' in this forum? The link you want is in this post:
http://p2p.wrox.com/topic.asp?TOPIC_...ms=folder,tree

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

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


<script language=javascript>
    function radioselect(rid)
    {
        alert(document.f1.rad1[rid].value);
    }
</script>

<body>
<form name=f1>
<table>
<%dim con,rs,i,level1
dim radval
radval=0
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
i=1
if not rs.EOF then

    'while not rs.EOF
        'parentid=rs(5)
        'Response.Write rs(1) & "<br>"
        level1=0

        display rs("LinkNAME"),rs("LinkID")
        rs.MoveNext
        level1=0
    'wend
else
    i=0
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
        'level=1

        while not rs1.EOF




%>



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

                                </table>
                            </td>
                            </tr>
    </tr>


<% rs1.MoveNext
        wend
        set rs1=nothing


end function
    Response.Write "</table>"

%>

</table>
</form>

</body>






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.