View::Activate Event

 

Occurs when the current View control becomes the active view.

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

public:
event EventHandler^ Activate {
	void add(EventHandler^ value);
	void remove(EventHandler^ value);
}

The Activate event is raised when the current View control becomes the active view. This occurs when the value of the ActiveViewIndex property changes or the SetActiveView method is called to specify a different View control. For example, if View1 is the active view within a MultiView control, when the ActiveViewIndex property changes to specify View2, the Activate event is raised for View2 and the Deactivate event is raised for View1.

The following code example demonstrates how to specify and code an event handler for the Activate event of a View control. When the active view changes, a message is displayed to the user specifying the View control that raised the Activate event and the View control that raised the Deactivate event.

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

.NET Framework
Available since 2.0
Return to top
Show: