Visual InterDev

getState Method

See Also      Applies To

Returns the value of a user-defined property or null if the property doesn't exist.

Syntax

object.getState(property)

Parameters

object

A PageObject script object.

property

A user-defined property that can be created by the PageObject design-time control. A user-defined property that is created by the PageObject control. The property must be specified as a string in the form pageObject_propertyName, where pageObject is the name of the page object in which the property is defined, and propertyName is the name assigned to the property.

Remarks

To set the value of a user-defined property, use the setState method.

An alternate way to get and set the values of user-defined properties is to use the getProperty and setProperty methods.

You can create user-defined properties for a PageObject control on the Properties tab of the PageObject custom properties dialog box. That is also where you can set the scope (read/write, client/server) of the property.

For more information on creating and using properties on ASP pages, see "Defining Properties for a Page Object" in Extending the Scripting Object Model Across Pages.