Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
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


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.6, 4.5, 4, 3.5, 3.0, 2.0
© 2015 Microsoft