XmlForm.FormState property
Office 2013
This documentation is preliminary and is subject to change.
Gets a reference to a property bag of type System.Collections.IDictionary that browser-enabled forms can use to maintain state information across sessions on the server.
Assembly: Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)
Property value
Type: System.Collections.IDictionaryAn IDictionary that contains any user-defined state variables that were defined in the declarations section of the form code.
The following code example shows a design pattern for creating a state variable in the declarations section of the FormCode class (before the InternalStartup method) that functions as a counter. The following code example verifies that the _Counter variable is null before returning the value to avoid errors where the FormState array was not initialized.