DataSourceDesigner Class

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

Provides design-time support in a design host for the DataSourceControl class.

Namespace: System.Web.UI.Design
Assembly: System.Design (in system.design.dll)

public ref class DataSourceDesigner : public ControlDesigner, IDataSourceDesigner
public class DataSourceDesigner extends ControlDesigner implements IDataSourceDesigner
public class DataSourceDesigner extends ControlDesigner implements IDataSourceDesigner

The DataSourceDesigner class is the base class for data source designers, such as the SqlDataSourceDesigner, AccessDataSourceDesigner, and ObjectDataSourceDesigner classes. If you create a new kind of data source control, you might also want to create a custom control designer for your control, and then derive it from the DataSourceDesigner class.

The DataSourceDesigner class has two event methods: the OnDataSourceChanged and OnSchemaRefreshed methods. Both of these classes can be temporarily disabled with the SuppressDataSourceEvents method, which sets the SuppressingDataSourceEvents property. Then, the event methods can be enabled again with the ResumeDataSourceEvents method.

There are two static methods that you can use to evaluate the equivalency of schemas or views without creating an instance of the class:

Notes to Inheritors To provide commands for the action list menu at design time in a derived class, you must override the ActionLists property to return a custom DesignerActionListCollection object with custom items that are derived from the DesignerActionList object.

The following code example shows how to use a custom data source control with several other small custom classes, as listed in the following table.

Custom class

Derived from

CustomDataSource

ObjectDataSource

CustomDataSourceDesigner

DataSourceDesigner

CustomDataSourceView

ObjectDataSourceView

CustomDesignDataSourceView

DesignerDataSourceView

BookListViewSchema

IDataSourceViewSchema

CustomIDFieldSchema

IDataSourceFieldSchema

CustomTitleFieldSchema

IDataSourceFieldSchema

BookItem (A two-field data structure.)

After compiling the code example, in Design view, open the .aspx page, then set the DataSourceID property to the ID of the custom data source control.

No code example is currently available or this language may not be supported.

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
Show: