Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > No Render on Treeview event

Reply
Thread Tools

No Render on Treeview event

 
 
Tim.Forbess@gmail.com
Guest
Posts: n/a
 
      09-18-2006
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>

 
Reply With Quote
 
 
 
 
Tim.Forbess@gmail.com
Guest
Posts: n/a
 
      09-18-2006
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!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between prerender and render event. archana ASP .Net 1 03-14-2007 08:19 AM
Accessing rails render method outside of view / Decorating render Glenn Gillen Ruby 0 11-17-2006 02:30 PM
Overriding Render Event Yama ASP .Net 0 10-21-2005 04:25 AM
rendering Button inside Render() event, makes it loose its click event handler association sonic ASP .Net 1 01-07-2005 06:33 PM
Page.Render do not render complete page Lau Lei Cheong ASP .Net 1 05-15-2004 04:10 AM



Advertisments