System.Web.UI.WebControls.SiteMapPath.CurrentNodeTemplate Property

Gets or sets a control template to use for the node of a site navigation path that represents the currently displayed page.

Syntax

[System.ComponentModel.Browsable(false)]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
[System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.SiteMapNodeItem), System.ComponentModel.BindingDirection.OneWay)]
[System.ComponentModel.DefaultValue(null)]
public virtual System.Web.UI.ITemplate CurrentNodeTemplate { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Set the SiteMapPath.CurrentNodeTemplate to an System.Web.UI.ITemplate object to use an System.Web.UI.WebControls.Image control or some other control, such as a System.Web.UI.WebControls.Label, as the current node's user interface element instead of a string.

If the SiteMapPath.CurrentNodeTemplate property is set, the template overrides both the current navigation node text displayed and any SiteMapPath.CurrentNodeStyle applied to it. If the currently displayed page corresponds to the root node, however, the SiteMapPath.RootNodeTemplate or SiteMapPath.RootNodeStyle is used.

You can declaratively set the SiteMapPath.CurrentNodeTemplate property to any Web server control, and the ASP.NET infrastructure performs the necessary steps to wrap the Web server control as an System.Web.UI.ITemplate object. However, Web server controls do not implement the System.Web.UI.ITemplate interface; therefore, when you work with the System.Web.UI.ITemplate properties programmatically, you must write an System.Web.UI.ITemplate wrapper for any template code. Then, the SiteMapPath.CurrentNodeTemplate property is set to an instance of the System.Web.UI.ITemplate wrapper.

Requirements

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