asp.net.ph

TreeView.EnableClientScript Property

System.Web.UI.WebControls Namespace   TreeView Class


.NET Framework version 2.0

Sets or retrieves a value indicating whether a TreeView control renders client-side script to handle expanding and collapsing events.

Syntax


Inline <asp:treeview enableclientscript = = true | false ... >
Script TreeView.EnableClientScript [ = true | false ]

Property Value

This property accepts or returns only a boolean value: true to render the client-side script on compatible browsers; otherwise, false. Default value is true.

Remarks

Use the EnableClientScript property to specify whether the TreeView control renders client-side script on compatible browsers to handle expanding and collapsing events.

When this property is set to true, compatible browsers execute the code to expand and collapse nodes on the client. The tree node data must be known in advance for the client-side script to work. Using client script prevents a post back to the server each time a node is expanded or collapsed.

When the tree node data is not known in advance, nodes can be populated from the client, if the PopulateNodesFromClient property is also set to true. In this scenario, you must also provide an event-handling method for the TreeNodePopulate event to populate the nodes.

NOTE: If the EnableClientScript property is set to false, the TreeView control posts back to the server each time a node is expanded or collapsed.

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