Set TreeNodeSrc to an XML file dynamically ???

Discussion in 'ASP .Net Web Controls' started by Guest, Sep 29, 2003.

  1. Guest

    Guest Guest

    Hi,



    How can I set the TreeView's TreeNodeSrc property to an XML file
    dynamically?:



    Below is what I want to do, but it doesn't work:



    private void Page_Load(object sender, System.EventArgs e)

    {

    this.TreeView1.TreeNodeSrc = "TreeView.xml";

    }
    Guest, Sep 29, 2003
    #1
    1. Advertising

  2. Hi,

    Thanks for your post. We are able to dynamically set the TREENODESRC
    attribute of a TreeNode, after that, please remember to call the databind
    method to render the changes. For example:

    private void Page_Load(object sender, System.EventArgs e)
    {
    this.TreeView1.TreeNodeSrc = "TreeView.xml";
    this.TreeView1.DataBind();
    }

    Please refer to MSDN online for detailed information and sample code:
    http://msdn.microsoft.com/library/default.asp?url=/workshop/webcontrols/beha
    viors/library/treeview/treeNodeSrc.asp

    Hope this helps.

    Regards,

    HuangTM
    Microsoft Online Partner Support
    MCSE/MCSD

    Get Secure! -- www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.
    Tian Min Huang, Sep 29, 2003
    #2
    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. Replies:
    0
    Views:
    2,059
  2. =?Utf-8?B?bWFya2FlbGtpbnNAbmV3c2dyb3Vwcy5ub3NwYW0=

    How to enter a variable in the treenodesrc of a treenode

    =?Utf-8?B?bWFya2FlbGtpbnNAbmV3c2dyb3Vwcy5ub3NwYW0=, Sep 15, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,060
    Steven Cheng[MSFT]
    Sep 19, 2005
  3. Thomas
    Replies:
    1
    Views:
    222
    Rajesh.V
    Oct 16, 2003
  4. Donal

    How to bind an xml string to TreeNodeSrc

    Donal, Mar 6, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    105
    Donal
    Mar 6, 2004
  5. ThoGen
    Replies:
    0
    Views:
    112
    ThoGen
    Apr 21, 2006
Loading...

Share This Page