SiteMapNode.Clone Method (Boolean)
Assembly: System.Web (in system.web.dll)
If the cloneParentNodes parameter is true, the Clone method recursively clones all direct ancestor nodes and associates them with the current cloned node. Child nodes are not cloned.
The Roles and Attributes collections are applied to new collections.
The following code example demonstrates how to call the Clone method to create a duplicate site map node from the current node. The ExpandForumPaths method is registered to handle the SiteMapResolve event. It uses the Clone method to create a working copy of the current site map node, modify attributes based on personalization data, and return the working copy.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.