| |||||||||||
TreeView.SelectedValue PropertySystem.Web.UI.WebControls Namespace TreeView Class .NET Framework version 2.0 Returns the value of the selected node in a TreeView control. Syntax
This property can only be used programmatically; it cannot be set when declaring the control. Property Value
The property is read only with no default value. RemarksUse the SelectedValue property to determine the value of the selected node in a TreeView control. This property simply returns the value of the Value property of the TreeNode object that is referred to by the SelectedNode property ( SelectedNode.Value ). If no Value is specified for the node, this property returns the value of the selected node's Text property. If the Text property in turn contains a null reference, or if no node is currently selected in the TreeView control, an empty string ( "" ) is returned. To access other properties of the selected node, though, such as Parent or Depth, you still need to use the SelectedNode property. ExampleThe following example demonstrates how to use the SelectedValue property to determine the value of the selected node in a TreeView control.
See AlsoTreeView Members SelectedNode Text Value |
| ||||||||||
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