View.SwitchView(String) Method

Definition

Changes the active view of a Microsoft Office InfoPath form to a specified view.

C#
public void SwitchView (string bstrName);

Parameters

bstrName
String

The name of the view to switch to. If an empty string is used, the default view is displayed.

Examples

In the following example, the SwitchView method of the ViewObject object is used to change the current view to the default view:

thisXDocument.View.<span class="label">SwitchView</span>("");

Remarks

If an empty string is used as the bstrName parameter, the view is changed to the default view of the form.

Applies to

Product Versions
InfoPath form templates Latest