PRB: Intellisense Doesn't Show Execute Methods for PageObject DTC (234143)



The information in this article applies to:

  • Microsoft Visual InterDev 6.0

This article was previously published under Q234143

SYMPTOMS

When you develop with the Visual InterDev PageObject Design-Time Control (DTC), intellisense may not show execute methods for your PageObject.

CAUSE

This behavior is commonly the result of one of several possible scenarios:
  • The PageObject DTC has a Scripting Platform of "Client (IE 4.0 DHTML)."
  • The referenced PageObject DTC has no Execute methods specified.
  • The PageObject DTC is being referenced in server-side code.
Execute methods are not available under these scenarios.

RESOLUTION

The PageObject DTC has a Scripting Platform of "Client (IE 4.0 DHTML)"

If a PageObject exists on an HTML page or is referred to using client-side code on the same Active Server Pages (ASP) page, then it has a scripting platform of "Client (IE 4.0 DHTML)" and will not possess any execute methods.

If a reference is set in a client-side PageObject DTC to a server-side PageObject DTC, the execute methods identified in the server-side PageObject DTC are referenced in code by using the name of the server-side PageObject DTC, not the client-side PageObject DTC that contains the reference.

For example, you may have a page called Poclient.htm containing a client-side PageObject DTC named "poclient." Your "poclient" PageObject DTC has a reference to Poserver.asp. Poserver.asp has a PageObject DTC named "poserver," which specifies an execute method named ServerFunction(). To reference ServerFunction() from Poclient.htm, you would use the server-side PageObject DTC, "poserver" as in the following:
<!-- client-side code in poclient.htm -->
<SCRIPT Language=JavaScript>
  function Button1_onclick() {
    var obj = poserver.execute.ServerFunction();
    alert(obj.return_value);
  }
</SCRIPT>
				
If you use "poclient" instead of "poserver" in the above code, intellisense will show no execute methods defined in pageobject "poserver."

The Referenced PageObject DTC has No Execute Methods Specified

In order for the execute collection (and Methods) to show in a reference to a server-side PageObject DTC, the server-side PageObject DTC must specify which methods are Execute methods. Do this by right-clicking the server-side PageObject DTC, selecting "Execute methods:" and creating an entry in the list for the specified method.

The PageObject DTC is Being Referenced in Server-Side Code

Execute methods are a remote scripting function and can be referred to only in client-side code. If a PageObject DTC is referred to in server-side ASP code, no execute collection will be available.

STATUS

This behavior is by design.

Modification Type:MajorLast Reviewed:7/27/2001
Keywords:kbCtrl kbDSupport kbide kbprb kbRemoteProg kbScript KB234143