SiteMapResolveEventHandler Delegate
Represents the method that will handle the SiteMapResolve event of a specific instance of the SiteMapProvider or static SiteMap class.
Assembly: System.Web (in System.Web.dll)
public delegate SiteMapNode^ SiteMapResolveEventHandler( Object^ sender, SiteMapResolveEventArgs^ e )
Parameters
- sender
-
Type:
System::Object^
The source of the event, an instance of the SiteMapProvider class.
- e
-
Type:
System.Web::SiteMapResolveEventArgs^
A SiteMapResolveEventArgs that contains the event data.
Return Value
Type: System.Web::SiteMapNode^The SiteMapNode that represents the result of the SiteMapResolveEventHandler operation.
The static SiteMap class exposes the SiteMapResolve event of the default site map provider.
When you create a SqlDataSourceCommandEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see NIB: Events and Delegates.
The following code example demonstrates how to handle the SiteMapResolve event on an ASP.NET Web page to modify the target URLs that are displayed by a site navigation control, such as the SiteMapPath control. In this example, the current page is a post page in an online bulletin board or forum. In order to render more meaningful site navigation, the URLs of the nodes that are displayed by the navigation control are appended with query strings that are relevant to the context.
Note |
|---|
It is safe to access the CurrentNode property from within the SiteMapResolveEventHandler class. The ASP.NET site navigation infrastructure guards against infinite recursion, in this case. |
Available since 2.0
