SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have deployed the code in When I connect this webpart to a list webpart, for some reason in the next function, connectedPart is null. Why this is happening?

        public override void PartCommunicationConnect(
            string interfaceName,
            WebPart connectedPart,
            string connectedInterfaceName,
            ConnectionRunAt runAt)
            // Keep track of whether the Web Part is connected.
            if (interfaceName == "MyFilterProviderInterface")
                _connected = true;
               _connectedWebPartTitle = SPEncode.HtmlEncode(connectedPart.Title);

And if IFilterProvider Interface is obsolete which one should I use? Is there some example like this one?

share|improve this question
up vote 2 down vote accepted

If the Web Part that is being connected to is on another page, connectedPart is null.

You can use IWebPartParameters Interface and it is clearly mentioned on IFilterProvider Interface

[ObsoleteAttribute("Use System.Web.UI.WebControls.WebParts.IWebPartParameters instead")] public interface IFilterProvider

Here is a sample which using IWebPartParameters Interface to build a consumer web part.

share|improve this answer
The other Web Part is not in another Page, so I don't know why it is happening this. Thanks for the link about IFilterProvider Interface. It is not what I was expecting but I could have another use for this. – Bargant Oct 28 '11 at 6:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.