SetDefaultView method (String)
Collapse the table of content
Expand the table of content

LoadingEventArgs.SetDefaultView method (String)

Office 2013 and later

Sets the default view of the form by specifying the name of the view.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

public abstract void SetDefaultView(
	string view


Type: System.String

The name of the view.


The parameter passed to this method is a null reference (Nothing in Visual Basic).


The parameter passed to this method is not valid. For example, it is of the wrong type or format.

This type or member can be accessed from code running in forms opened in Microsoft InfoPath Filler or in a Web browser.

In the following code example, the SetDefaultView(System.String) method is used in the Loading event handler to set the default view to the view named "View2".

public void FormEvents_Loading(object sender, LoadingEventArgs e)
© 2015 Microsoft