Gets a PortalSiteMapNode object that represents the item that a site user is currently visiting.
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
This property only gets the PortalSiteMapNode object if it would be an inexpensive operation.
For better performance, the CurrentNode property only avoids database queries by reading its data from a cache. However, if the object cannot be found in the cache, then a database query will still occur, which may be undesirable.
The property guarantees that these database queries cannot occur by instead returning a null reference (Nothing in Visual Basic) if the required objects were not already loaded into the cache. This is useful for nonessential operations that should only be performed if this can be done cheaply.