Visual InterDev

setState Method

See Also      Applies To

Sets the value of a specified property.

Syntax

object.setState(property, value)

Parameters

object

A PageObject script object.

property

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.

value

The value that you want to assign to property.

Remarks

To delete the property, supply null for the value parameter.

You can use the getState method to return the value of a particular property.

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 Extending the Scripting Model Across Pages.