System.Web.UI.WebControls.MultiView.SwitchViewByIndexCommandName Field

Represents the command name associated with changing the active System.Web.UI.WebControls.View control in a System.Web.UI.WebControls.MultiView control based on a specified System.Web.UI.WebControls.View index. This field is read-only.

Syntax

public static readonly string SwitchViewByIndexCommandName

Remarks

Use the MultiView.SwitchViewByIndexCommandName field to represent the "SwitchViewByIndex" command name.

You can use the value of this field to take advantage of the System.Web.UI.WebControls.MultiView control's automatic updating of the active System.Web.UI.WebControls.View control. For example, if a System.Web.UI.WebControls.View control contains a System.Web.UI.WebControls.Button control that navigates to the first System.Web.UI.WebControls.View when clicked, you can set the Button.CommandName property to the value of the MultiView.SwitchViewByIndexCommandName field, which is "SwitchViewByIndex". Set the Button.CommandArgument property to the index of the first System.Web.UI.WebControls.View in the System.Web.UI.WebControls.MultiView control, which is 0. This causes the System.Web.UI.WebControls.MultiView control to automatically set the MultiView.ActiveViewIndex property to 0 when the button is clicked.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0