Obtains or sets the index of the active view control of the multiview control.
Namespace: system. Web. UI. webcontrols
Attribute Value
Type: system. int32
The index of the active view control of the multiview control starting from scratch. The default value is-1, indicating that no view is set as an active view.
UseActiveviewindexProperty to set the View Control in the multiview control as the active view. This attribute can also be used to return the index of the View control currently set as the active view. The index of the View control is determined by its declared order in the multiview control. For example, the index of the first view Control declared in the multiview control is 0.
In a multiview control, only one view control can be defined as an active view at a time. SetActiveviewindexThe view control of the property is displayed to the client. IfActiveviewindexIf the attribute is set to a view that does not exist in the multiview control, argumentoutofrangeexception is thrown during running. If this property is blank, the multiview control does not render any content to the client.
It can be set in declaration or programming mode during development.ActiveviewindexAttribute. If you set it in declaration when defining the multiview ControlActiveviewindexProperty, the view control set as the active view is displayed to the client when the multiview control is called for the first time. If you setActiveviewindexProperties, the application can determine which view control to display to the client according to user identity or preferences.
Alternatively, you can use the setactiveview and getactiveview methods to set or obtain the activity view of the multiview control.