This topic has not yet been rated - Rate this topic

SiteMapDataSourceView Class

Provides a strongly typed HierarchicalDataSourceView object for the SiteMapDataSource control.

System.Object
  System.Web.UI.DataSourceView
    System.Web.UI.WebControls.SiteMapDataSourceView

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)
public class SiteMapDataSourceView : DataSourceView

The SiteMapDataSourceView type exposes the following members.

  Name Description
Public method SiteMapDataSourceView(SiteMapDataSource, String, SiteMapNode) Initializes a new named instance of the SiteMapDataSourceView class, adding the single specified node to the internal collection of nodes.
Public method SiteMapDataSourceView(SiteMapDataSource, String, SiteMapNodeCollection) Initializes a new named instance of the SiteMapDataSourceView class, setting the internal collection of nodes to the specified node collection.
Top
  Name Description
Public property CanDelete Gets a value indicating whether the DataSourceView object associated with the current DataSourceControl object supports the ExecuteDelete operation. (Inherited from DataSourceView.)
Public property CanInsert Gets a value indicating whether the DataSourceView object associated with the current DataSourceControl object supports the ExecuteInsert operation. (Inherited from DataSourceView.)
Public property CanPage Gets a value indicating whether the DataSourceView object associated with the current DataSourceControl object supports paging through the data retrieved by the ExecuteSelect method. (Inherited from DataSourceView.)
Public property CanRetrieveTotalRowCount Gets a value indicating whether the DataSourceView object associated with the current DataSourceControl object supports retrieving the total number of data rows, instead of the data. (Inherited from DataSourceView.)
Public property CanSort Gets a value indicating whether the DataSourceView object associated with the current DataSourceControl object supports a sorted view on the underlying data source. (Inherited from DataSourceView.)
Public property CanUpdate Gets a value indicating whether the DataSourceView object associated with the current DataSourceControl object supports the ExecuteUpdate operation. (Inherited from DataSourceView.)
Protected property Events Gets a list of event-handler delegates for the data source view. (Inherited from DataSourceView.)
Public property Name Gets the name of the data source view. (Inherited from DataSourceView.)
Top
  Name Description
Public method CanExecute Determines whether the specified command can be executed. (Inherited from DataSourceView.)
Public method Delete Performs an asynchronous delete operation on the list of data that the DataSourceView object represents. (Inherited from DataSourceView.)
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method ExecuteCommand(String, IDictionary, IDictionary) Executes the specified command. (Inherited from DataSourceView.)
Public method ExecuteCommand(String, IDictionary, IDictionary, DataSourceViewOperationCallback) Executes the specified command. (Inherited from DataSourceView.)
Protected method ExecuteDelete Performs a delete operation on the list of data that the DataSourceView object represents. (Inherited from DataSourceView.)
Protected method ExecuteInsert Performs an insert operation on the list of data that the DataSourceView object represents. (Inherited from DataSourceView.)
Protected method ExecuteSelect Gets the collection of the SiteMapNode objects that represents the site navigation structure for the current user. (Overrides DataSourceView.ExecuteSelect(DataSourceSelectArguments).)
Protected method ExecuteUpdate Performs an update operation on the list of data that the DataSourceView object represents. (Inherited from DataSourceView.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Insert Performs an asynchronous insert operation on the list of data that the DataSourceView object represents. (Inherited from DataSourceView.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnDataSourceViewChanged Raises the DataSourceViewChanged event. (Overrides DataSourceView.OnDataSourceViewChanged(EventArgs).)
Protected method RaiseUnsupportedCapabilityError Called by the RaiseUnsupportedCapabilitiesError method to compare the capabilities requested for an ExecuteSelect operation against those that the view supports. (Inherited from DataSourceView.)
Public method Select(DataSourceSelectArguments) Gets the collection of the SiteMapNode objects that represents the site navigation structure for the current user.
Public method Select(DataSourceSelectArguments, DataSourceViewSelectCallback) Gets a list of data asynchronously from the underlying data storage. (Inherited from DataSourceView.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Update Performs an asynchronous update operation on the list of data that the DataSourceView object represents. (Inherited from DataSourceView.)
Top
  Name Description
Public event DataSourceViewChanged Occurs when the data source view has changed. (Inherited from DataSourceView.)
Top

The SiteMapDataSource control enables ASP.NET data-bound controls, such as the TreeView and Menu controls, to bind to site map data. The SiteMapDataSourceView class is used by controls developers but it is not used by page developers nor in page code.

The SiteMapDataSource returns a SiteMapDataSourceView for a specified hierarchical path when the Select method is called. Like all hierarchical data source view objects, the SiteMapDataSourceView is not named; rather, its is identified by its unique hierarchical path.

The SiteMapDataSourceView is a wrapper class on a SiteMapNodeCollection collection. The SiteMapNodeCollection class implements the IHierarchicalEnumerable interface, which the SiteMapDataSourceView class returns from a call to Select method. Because the SiteMapDataSource and SiteMapDataSourceView work with SiteMapNode objects, the view maintains an internal SiteMapNodeCollection to contain them. The collection is initialized using the view's constructors and accessed with the Select() method.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ