System.Web.UI.WebControls.TreeView.CreateNode Method

Returns a new instance of the System.Web.UI.WebControls.TreeNode class. The TreeView.CreateNode is a helper method.

Syntax

protected virtual TreeNode CreateNode ()

Returns

A new instance of the System.Web.UI.WebControls.TreeNode.

Remarks

The TreeView.CreateNode method is a helper method that returns a new instance of the System.Web.UI.WebControls.TreeNode class.

The TreeView.CreateNode method is used primarily by control developers. Control developers that want to extend the System.Web.UI.WebControls.TreeView class by extending the System.Web.UI.WebControls.TreeNode class should override this method to return an object that derives from the System.Web.UI.WebControls.TreeNode. A common reason to extend the System.Web.UI.WebControls.TreeNode class is to override the TreeNode.RenderPreText(System.Web.UI.HtmlTextWriter) and TreeNode.RenderPostText(System.Web.UI.HtmlTextWriter) methods.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0