This documentation is archived and is not being maintained.

DataSourceControl::RaiseDataSourceChangedEvent Method

Raises the DataSourceChanged event.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

protected:
virtual void RaiseDataSourceChangedEvent(
	EventArgs^ e
)

Parameters

e
Type: System::EventArgs

An EventArgs that contains event data.

The RaiseDataSourceChangedEvent method notifies a data-bound control that the underlying data source or the data cached in memory has changed, and that the control should rebind and perform any necessary additional work. Typically, the RaiseDataSourceChangedEvent method is called when a property of the data source control or a parameter value has changed.

Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

Notes to Inheritors:

When overriding RaiseDataSourceChangedEvent in a derived class, be sure to call the base class's RaiseDataSourceChangedEvent method so that registered delegates receive the event.

The following code example demonstrates how to call the RaiseDataSourceChangedEvent method when a data source or its underlying data has changed in a way that might affect any bound controls. In this example, a file-based data source control that extends the DataSourceControl class raises the DataSourceChanged event by calling RaiseDataSourceChangedEvent any time the FileName property is changed.

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

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: