ADO Net Database ASP.Net Tutorial

<%@ Page Language="C#" %>
<%@ Register TagPrefix="custom" Namespace="MyNamespace" %>
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
    {
        lblSelected.Text = TreeView1.SelectedValue;
    }



    Show TreeView


    
    

            id="TreeView1"
        DataSourceID="srcDiscuss"
        OnSelectedNodeChanged="TreeView1_SelectedNodeChanged"
        ImageSet="News"
        Runat="server">
        
                            TextField="Subject"
                ValueField="MessageId" />
        

    
            id="srcDiscuss"
        ConnectionString='<%$ ConnectionStrings:Discuss %>'
        DataKeyName="MessageId"
        DataParentKeyName="ParentId"
        SelectCommand="SELECT MessageId,ParentId,Subject FROM Discuss"
        Runat="server" />
    
    You selected message number:
            id="lblSelected"
        Runat="server" />