- Method 1: process a webpart eventProgramTo assign the information to another webpart attribute. The webpart receiving information is rendered by this attribute value. These two webparts must be added on the same page.
- Method 2: moss provides a special web part Connection Mechanism for transmitting data between WP.
The WP for data transfer in Sharepoint is divided into two types:
Provider WP: provides data
Consumer WP: receive data
The Web Part Connection Mechanism provides a loosely coupled data connection mechanism. Both provider WP and consumer WP only care about their own implementations, rather than the data receiving or provider, and how to use them.
After deployment, we place provider WP and consumer WP on our page. At this time, the SharePoint mechanism will automatically detect all types of Web parts on the page, connect the two Web parts through the data channel ,. If the data provided by a provider WP can be used by another consumer WP, the administrator can directly connect them on the page. One provider WP can be used by multiple consumer WP. Through the data channel, data transmission between provider and consumer is realized.
The key to the 2nd method is to establish an interface, which is then used by both parties to provide and receive corresponding data. For example: