Show All

# default Attribute

Specifies the name identifier of the view chosen to be the default view.

## Type

    xsd:string

## Remarks

The default attribute is an optional attribute of the views element.

If not specified, the default view is the first view element found within the views element. This view is loaded when an Microsoft Office InfoPath 2003 is initially opened.

Note In the case of forms that use ActiveX Data Objects (ADO) or a Web service as their primary data source, the default view is set by the initialView attribute in the processing instruction of the form's XML template file. This attribute cannot be changed while in design mode.

## Example

The following is an example of the default attribute as it is used in the views element:

    <xsf:views default="View">
       <xsf:view name="View" caption="View">
          <xsf:mainpane transform="view1.xsl"></xsf:mainpane>
          ...
       </xsf:view>
    </xsf:views>

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp