My treeview doesn't work...

Discussion in 'ASP .Net Web Controls' started by Chris Hoare, Nov 28, 2003.

  1. Chris Hoare

    Chris Hoare Guest

    I have tried to create a treeview but instead of an
    explorer style screen, I get a line of text with nothing
    treeview-like about it at all.

    Heres my code....




    <html>
    <body>
    <form name="Form1" method="post"
    action="webform2.aspx" id="Form1">
    <input type="hidden" name="__Treeview1_State__" value="" />
    <input type="hidden" name="__VIEWSTATE"
    value="dDwxNjkzMTE3NDIyO3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+Oz47
    bDx0PEAwPHA8cDxsPFNlbGVjdGVkTm9kZUluZGV4Oz47bDwwOz4+Oz47Ozs
    7O0AwPDtAMDxsPGk8MD47PjtsPEAwPEAwPHA8bDxTZWxlY3RlZDs+O2w8bz
    x0Pjs+Pjs7Ozs+Ozs+Oz47Pjs+Oz47Oz47Pj47Pj47bDxUcmVldmlldzE7P
    j6WbtDyH//k5D37neLk1s9e8S6T+w==" />

    <?XML:NAMESPACE PREFIX=TVNS />
    <?IMPORT NAMESPACE=TVNS
    IMPLEMENTATION="/webctrl_client/1_0/treeview.htc" />
    <tvns:treeview id="Treeview1" NAME="Treeview1"
    selectedNodeIndex="0" HelperID="__Treeview1_State__"
    systemImagesPath="/webctrl_client/1_0/treeimages/"
    onexpand="javascript: if (this.clickedNodeIndex != null)
    this.queueEvent('onexpand', this.clickedNodeIndex)"
    oncollapse="javascript: if (this.clickedNodeIndex != null)
    this.queueEvent('oncollapse', this.clickedNodeIndex)"
    oncheck="javascript: if (this.clickedNodeIndex != null)
    this.queueEvent('oncheck', this.clickedNodeIndex)"
    onselectedindexchange="javascript: if
    (event.oldTreeNodeIndex != event.newTreeNodeIndex)
    this.queueEvent('onselectedindexchange',
    event.oldTreeNodeIndex + ',' + event.newTreeNodeIndex)">
    <tvns:treenode Selected="true">
    My first Tree Node<tvns:treenode>
    My second Tree Node
    </tvns:treenode>
    </tvns:treenode>
    </tvns:treeview>
    </form>
    </body>
    </html>
    Chris Hoare, Nov 28, 2003
    #1
    1. Advertising

  2. Chris Hoare

    Guest Guest

    check web root of /webctrl_client/1_0/
    or install tree control at web mac
    >-----Original Message-----
    >I have tried to create a treeview but instead of an
    >explorer style screen, I get a line of text with nothing
    >treeview-like about it at all.
    >
    >Heres my code....
    >
    >
    >
    >
    ><html>
    > <body>
    > <form name="Form1" method="post"
    >action="webform2.aspx" id="Form1">
    ><input type="hidden" name="__Treeview1_State__"

    value="" />
    ><input type="hidden" name="__VIEWSTATE"
    >value="dDwxNjkzMTE3NDIyO3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+Oz

    47
    >bDx0PEAwPHA8cDxsPFNlbGVjdGVkTm9kZUluZGV4Oz47bDwwOz4+Oz47O

    zs
    >7O0AwPDtAMDxsPGk8MD47PjtsPEAwPEAwPHA8bDxTZWxlY3RlZDs+O2w8

    bz
    >x0Pjs+Pjs7Ozs+Ozs+Oz47Pjs+Oz47Oz47Pj47Pj47bDxUcmVldmlldzE

    7P
    >j6WbtDyH//k5D37neLk1s9e8S6T+w==" />
    >
    > <?XML:NAMESPACE PREFIX=TVNS />
    ><?IMPORT NAMESPACE=TVNS
    >IMPLEMENTATION="/webctrl_client/1_0/treeview.htc" />
    ><tvns:treeview id="Treeview1" NAME="Treeview1"
    >selectedNodeIndex="0" HelperID="__Treeview1_State__"
    >systemImagesPath="/webctrl_client/1_0/treeimages/"
    >onexpand="javascript: if (this.clickedNodeIndex != null)
    >this.queueEvent('onexpand', this.clickedNodeIndex)"
    >oncollapse="javascript: if (this.clickedNodeIndex !=

    null)
    >this.queueEvent('oncollapse', this.clickedNodeIndex)"
    >oncheck="javascript: if (this.clickedNodeIndex != null)
    >this.queueEvent('oncheck', this.clickedNodeIndex)"
    >onselectedindexchange="javascript: if
    >(event.oldTreeNodeIndex != event.newTreeNodeIndex)
    >this.queueEvent('onselectedindexchange',
    >event.oldTreeNodeIndex + ',' + event.newTreeNodeIndex)">
    > <tvns:treenode Selected="true">
    > My first Tree Node<tvns:treenode>
    > My second Tree Node
    > </tvns:treenode>
    > </tvns:treenode>
    ></tvns:treeview>
    > </form>
    > </body>
    ></html>
    >.
    >
    Guest, Nov 29, 2003
    #2
    1. Advertising

  3. Chris Hoare

    MSFT Guest

    Hi Chris,

    IF the IE web controls haven't beed installed correctly, there will be such
    a problem. You can follow these steps to complete the installation:

    To build the IE Web Controls:

    1. Make sure you have installed the .NET Framework SDK v1.0 or v1.1
    2. Run Build.bat, which will create a build folder in this directory.
    The build folder contains Microsoft.Web.UI.WebControls.dll and a
    Runtime directory of supporting files.

    To run the IE Web Controls:

    1. Copy the contents of the Runtime directory to the webctrl_client\1_0
    directory under your top-level site directory. For example, if your
    site root is c:\Inetpub\wwwroot, type this at the command prompt:

    xcopy /s /i .\build\Runtime c:\Inetpub\wwwroot\webctrl_client\1_0 /y

    This will create the following directory structure under the site:

    /webctrl_client/1_0
    MultiPage.htc
    TabStrip.htc
    toolbar.htc
    treeview.htc
    webservice.htc
    webserviced.htc
    [images]
    [treeimages]

    2. Create a new web application in IIS and copy the contents of the
    samples directory to this application directory. For example:

    xcopy /s /i .\samples c:\Inetpub\wwwroot\sampleapp /y

    3. Create a /bin subdirectory for the application and copy the file
    Microsoft.Web.UI.WebControls.dll to this directory.

    The contents of the application will be as follows:

    /sampleapp
    multipage.aspx
    state_city.xml
    tabstrip.aspx
    toolbar.aspx
    treeview.aspx
    treeview_bound.aspx
    /bin
    Microsoft.Web.UI.WebControls.dll

    4. Request the sample pages from your Internet Explorer web browser, for
    example: http://localhost/sampleapp/multipage.aspx

    For additional documentation and samples visit:
    http://msdn.microsoft.com/library/default.asp?url=/workshop/webcontrols/webc
    ontrols_entry.asp


    Luke
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    MSFT, Dec 1, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Aaron Ackerman
    Replies:
    1
    Views:
    1,883
    Ken Cox [Microsoft MVP]
    Jan 31, 2004
  2. AcuZod
    Replies:
    0
    Views:
    707
    AcuZod
    Apr 24, 2006
  3. MZ
    Replies:
    7
    Views:
    828
    Ed Mullen
    Mar 17, 2008
  4. Tilman
    Replies:
    0
    Views:
    413
    Tilman
    Mar 19, 2008
  5. rigo
    Replies:
    0
    Views:
    173
Loading...

Share This Page