System.Web.UI.WebControls.MultiView.SwitchViewByIDCommandName 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 id. This field is read-only.

Syntax

public static readonly string SwitchViewByIDCommandName

Remarks

Use the MultiView.SwitchViewByIDCommandName field to represent the "SwitchViewByID" 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.SwitchViewByIDCommandName field, which is "SwitchViewByID". Set the Button.CommandArgument property to the ID of the first System.Web.UI.WebControls.View in the System.Web.UI.WebControls.MultiView control, such as "Page1". This causes the System.Web.UI.WebControls.MultiView control to automatically set "Page1" as the active System.Web.UI.WebControls.View 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