Share via


Visual InterDev

             

Creates a PageObject script object, which enables you to treat the page as an object.

Remarks

Because a PageObject script object let you treat a page as an object, you can write script against the page. The PageObject control's properties define how script can be used for the page.

You can set the properties of the PageObject control at design time using the Properties window and the PageObject Properties dialog box. In the PageObject Properties dialog box you have the following options:

  • Methods tab (Available only for ASP pages)   Specifies methods that you want to export for use on both the client and server.

  • Properties tab (Available only for ASP pages)   Creates user-defined properties used in script with the design-time controls on your ASP page. These user-defined properties are then available to both the client and server from your ASP page, and other ASP pages can reference the property.

  • References tab (Available on ASP and HTML pages)   Sets references to other pages. Allows you to call objects' methods on other pages and access their user-defined properties.

For more information about scripting against PageObjects, see The Scripting Object Model and Writing Script for Script Objects.

When you add a PageObject control to an ASP page, you must first enable the scripting object model.

To enable the scripting object model for an ASP page

  1. Right-click on the page itself, not on a control, and select Properties.

  2. On the General tab, select Enable scripting object model.

For more information about the run-time object, see PageObject Script Object. For information on scripting and objects, see Scripting with Design-Time Controls and Script Objects.