No Render on Treeview event

Discussion in 'ASP .Net Web Controls' started by Tim.Forbess@gmail.com, Sep 18, 2006.

  1. Guest

    During a postback event from the treeview control I try to update a
    label's text. The code is called in the event handler for
    OnTreeNodePopulate but the label text isn't updated when the page
    returns. Below is the sample code. Ideas?
    --------------------------------

    <%@ Page Language="C#" %>


    <script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
    }


    public void OnPopulate(Object sender, TreeNodeEventArgs e)
    {
    MessageLabel.Text = "populating";
    }
    </script>


    <html>
    <head runat="server"><title>Test</title></head>
    <body>
    <form id="form1" runat="server"><div>
    <asp:TreeView ID="TreeControl" runat="server"
    OnTreeNodePopulate="OnPopulate">
    <Nodes>
    <asp:TreeNode Text="Root" Expanded="False"
    PopulateOnDemand="true"></asp:TreeNode>
    </Nodes>
    </asp:TreeView>
    <asp:Label ID="MessageLabel" runat="server"
    Text=""></asp:Label>
    </div></form>
    </body>
    </html>
     
    , Sep 18, 2006
    #1
    1. Advertising

  2. Guest

    The answer seems to be that this treeview event is an "out of band"
    request. An out of band request obtains additional data, without
    posting the entire page. Therefore only the treeview is updated.

    This is fine, but it would have been nice to know in the documentation
    for the event!
     
    , Sep 18, 2006
    #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. Lau Lei Cheong

    Page.Render do not render complete page

    Lau Lei Cheong, May 15, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,091
    Lau Lei Cheong
    May 15, 2004
  2. sonic
    Replies:
    1
    Views:
    543
    John Saunders
    Jan 7, 2005
  3. Yama

    Overriding Render Event

    Yama, Oct 21, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    470
  4. archana
    Replies:
    1
    Views:
    2,783
    Eliyahu Goldin
    Mar 14, 2007
  5. Glenn Gillen
    Replies:
    0
    Views:
    287
    Glenn Gillen
    Nov 17, 2006
Loading...

Share This Page