asp.net.ph

TreeView.MaxDataBindDepth Property

System.Web.UI.WebControls Namespace   TreeView Class


.NET Framework version 2.0

Sets or retrieves the maximum number of levels in a data source to bind to a TreeView control.

Syntax


Inline <asp:treeview maxdatabinddepth = intValue ... >
Script TreeView.MaxDataBindDepth [ = intValue ]

Property Value


intValue The maximum depth of tree levels to bind to the TreeView control.

The property is read/write with a default value of -1, which binds all the tree levels in the data source to the control.

Remarks

Use the MaxDataBindDepth property to limit the number of node levels in a data source to bind to a TreeView control.

For example, setting this property to 2 binds only the root node and any nodes that are immediately under the root node to the TreeView control. All remaining nodes in the data source are ignored.

NOTE: A malicious user can create a callback request and get data for the nodes of the TreeView control that the page developer is not displaying. Therefore, security of the data must be implemented by the data source. Do not use the MaxDataBindDepth property to hide data.

See Also

TreeView Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 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 asp.net.ph