This documentation is archived and is not being maintained.

MultiView::PreviousViewCommandName Field

Represents the command name associated with the previous View control to display in a MultiView control. This field is read-only.

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

public:
static initonly String^ PreviousViewCommandName

Use the PreviousViewCommandName field to represent the "PrevView" command name.

You can use the value of this field to take advantage of the MultiView control's automatic updating of the active View control. For example, if a View control contains a Button control that navigates to the next View, you can set the CommandName property to the value of the PreviousViewCommandName field, which is "PrevView". This causes the MultiView control to automatically increment the value of the ActiveViewIndex property when the button is clicked.

The following code example demonstrates how to use a MultiView control to create a basic survey. Each View control is a separate survey question. The PreviousViewCommandName and NextViewCommandName fields are used to provide automatic navigation between the previous and next View controls in the survey.

NoteNote:

The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see ASP.NET Web Page Code Model.

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

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: