Export (0) Print
Expand All

DataSourceControl.RaiseDataSourceChangedEvent Method

Raises the DataSourceChanged event.

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

abstract RaiseDataSourceChangedEvent : 
        e:EventArgs -> unit 
override RaiseDataSourceChangedEvent : 
        e:EventArgs -> unit 

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.

.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.

Community Additions

ADD
Show:
© 2015 Microsoft