GetWebPartCrossPageCompatibility Method
The GetWebPartCrossPageCompatibility method of the Web Part Pages service is used to determine whether Web Parts on two different pages are compatible with each other. The class returns connection information for all parts on the target page and compatibility information of the source Web Part with all the parts on a target page.
Parameters
Return Value
A string that contains the compatibility information of the providerPartID with all the parts on the target page, along with group and interface information for all the parts on the target page. This string is an XML data island.
Remarks
The arguments identifying the target page and source page are mutually exclusive—provide a value for only one of the two arguments targetPageUrl ortargetPageContents, and sourcePageURL or sourcePageContents.
For static Web Parts (not in a Web Part zone), it is possible that the part has an ID (an HTML ID) only, and not a WebPartID (a GUID). In this case, the user can provide the ID as a string to providerPartID. If the static part has only a WebPartID, or both an ID and a WebPartID, then the user must send the WebPartID to the Web Service.
Example
The following code example shows a locally defined GetWebPartCrossPageCompatibility method that looks for an Events Web Part in a source Web Part Page, and finds the Web Parts in a target Web Part Page that can connect to the Events Web Part. It does so by calling the GetWebPartProperties and GetWebPartCrossPageCompatibility methods of the Web Part Pages service through a proxy. This code example and the proxy are part of a larger example provided for the Web Part Pages service.
Requirements
Platforms: Microsoft Windows Server 2003
Web Reference: http://Server_Name[sites/][Site_Name/]/_vti_bin/WebPartPages.asmx
Security: Code Access Security