Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

XmlDataSourceView Class

Note: This class is new in the .NET Framework version 2.0.

Represents a tabular data source view on XML data for an XmlDataSource control.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public sealed class XmlDataSourceView : DataSourceView
public final class XmlDataSourceView extends DataSourceView
public final class XmlDataSourceView extends DataSourceView

The XmlDataSource control can present its underlying data in both tabular and hierarchical format to Web server controls that bind to it. Controls such as GridView or DropDownList use the XmlDataSource to bind to XML data and present it in list or tabular form, while controls that derive from the HierarchicalDataBoundControl class, such as TreeView, bind to XML data and present it in hierarchical form.

The XmlDataSource creates each view type internally through different code paths. If the GetView method is called on the XmlDataSource, an XmlDataSourceView is created by the XmlDataSource. If the GetHierarchicalView method is called, an XmlHierarchicalDataSourceView is created. The XmlDataSourceView class is provided for Web server controls that derive from DataBoundControl and bind to lists and tabular data, while the XmlHierarchicalDataSourceView is provided for Web server controls that derive from HierarchicalDataBoundControl and bind to hierarchical data. Internally, all data-bound control methods call the Select method on whichever data source view object is returned.

Like all DataSourceView helper objects, the XmlDataSourceView defines the operations that the data source can perform with the underlying data. Because the XmlDataSourceView class only overrides the Select method, the associated XmlDataSource control does not support update, insert, or delete operations. Because the XmlDataSourceView class is sealed, you cannot extend the XmlDataSourceView class to add this functionality, but you can derive a data source control from XmlDataSource and a view from DataSourceView if you require additional functionality.

System.Object
   System.Web.UI.DataSourceView
    System.Web.UI.WebControls.XmlDataSourceView
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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.

.NET Framework

Supported in: 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.