Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Connecting web parts at run time

  Asked By: Demarco    Date: Aug 09    Category: Sharepoint    Views: 1018

Ok, I've got a web part that I'm trying to establish a connection
whenever it's on a page with another part on the page.

I've tried calling the PartCommunicationConnect method on my web part
(the list consumer) with the interface information, calling it from
OnInit, OnPreRender, RenderWebPart, Dispose, OnLoad and nothing
appears to happen.

When I try to call the same method on the part I'm consuming the list
from I get an exception that it cannot find the interface. The
interface is the one that I've looked at when I connect the parts
manually in the debugger.

I've also tried setting the Connections string on both the web parts,
but I guess it's getting overwritten by the page after all the web
parts are initialized.

Has anyone gotten this to actually work?



1 Answer Found

Answer #1    Answered By: Ana Payne     Answered On: Aug 09

Writing connection interfaces is not for the faint of heart. My Current
User Web Part demonstrates how to create an IRowProvider interface.
Check it out on the Mindsharp Premium Content site.

Didn't find what you were looking for? Find more on Connecting web parts at run time Or get search suggestion and latest updates.