ObjectDataSource.ObjectCreated Событие
Определение
public:
event System::Web::UI::WebControls::ObjectDataSourceObjectEventHandler ^ ObjectCreated;
public event System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler ObjectCreated;
member this.ObjectCreated : System.Web.UI.WebControls.ObjectDataSourceObjectEventHandler
Public Custom Event ObjectCreated As ObjectDataSourceObjectEventHandler
Тип события
Комментарии
Обрабатывайте ObjectCreated событие, чтобы вызвать другие методы для бизнес-объекта, задать свойства или выполнить другую инициализацию, относящуюся к бизнес-объекту, прежде чем ObjectDataSource объект вызовет метод данных бизнес-объекта для выполнения операции с данными.Handle the ObjectCreated event to call other methods on the business object, set properties, or perform other initialization that is specific to the business object before the ObjectDataSource object calls the business object data method to perform a data operation. Обращение к объекту осуществляется через ObjectInstance свойство, которое предоставляется ObjectDataSourceEventArgs объектом.A reference to the object is accessed by the ObjectInstance property, which is exposed by the ObjectDataSourceEventArgs object.
Если метод, определенный для выполнения операции с данными, имеет значение static
( Shared
в Visual Basic), ObjectCreating события и ObjectCreated никогда не вызываются.If the method that is identified to perform the data operation is static
(Shared
in Visual Basic), the ObjectCreating and ObjectCreated events are never raised.
Дополнительные сведения об обработке событий см. в разделе обработка и вызов событий.For more information about how to handle events, see Handling and Raising Events.
Применяется к
См. также раздел
- ObjectCreating
- ObjectDisposing
- Элементы управления веб-сервером с источником данныхData Source Web Server Controls
- Общие сведения об элементе управления ObjectDataSourceObjectDataSource Control Overview
- Создание исходного объекта элемента управления ObjectDataSourceCreating an ObjectDataSource Control Source Object