| |||||||||||||||||||
TreeNode.Text PropertySystem.Web.UI.WebControls Namespace TreeNode Class .NET Framework version 2.0 Sets or retrieves the text displayed for a TreeNode in a TreeView control. Syntax
Property Value
The property is read/write with no default value. RemarksUse the Text property to specify or determine the text to display for a TreeNode in a TreeView control. In certain cases, such as when a TreeView control is bound to a data source, the Text property is usually obtained dynamically from the data source. ExampleThe following example shows how to declaratively set the Text property of tree nodes at design time. <asp:treenode text = "News"> The following example shows how to programmatically set the Text property of tree nodes at run time.
The following example demonstrates how to programmatically determine the given Text for a node and its parent, when the user selects an item from a TreeView control.
Note that this example merely serves to illustrate the concept. If all you need is to determine the selected node's Text, simply use the SelectedNode.Text property instead, without having to code a handler for the SelectedNodeChanged event. See AlsoTreeNode Members Value SelectedValue |
| ||||||||||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme