Edit

Share via


SiteMapDataSource.GetView(String) Method

Definition

Retrieves a named view on the site map data of the site map provider according to the starting node and other properties of the data source.

public:
 virtual System::Web::UI::DataSourceView ^ GetView(System::String ^ viewName);
public virtual System.Web.UI.DataSourceView GetView (string viewName);
abstract member GetView : string -> System.Web.UI.DataSourceView
override this.GetView : string -> System.Web.UI.DataSourceView
Public Overridable Function GetView (viewName As String) As DataSourceView

Parameters

viewName
String

The name of the data source view to retrieve.

Returns

A HierarchicalDataSourceView helper object on the site map data, according to the starting node that is identified by the StartingNodeUrl property or its child, if the ShowStartingNode is false.

Exceptions

The Provider is null.

The StartingNodeUrl is set but the SiteMapDataSource cannot resolve a node for the specified URL.

Remarks

The viewName parameter is the URL for the root node of the view, not the name of the data source view as it is with other data source controls that support named views.

Applies to

See also