Connected Web parts RRS feed

  • Question

  • Hi,

    To make connected web parts, I have made the following:

    public interface IMessage


    string Message{get;}


    I have implemented the above interface in Provider web part



      public string Message
            { get { return "MyMessage"; }  }

            public IMessage SendThis()
                    return this;


    In Consumer I have done the following :

      string Msg="No Message exists";
            void GetProductId(IProduct CategObject)
                Msg= CategObject.Message;
            protected override void OnPreRender(EventArgs e)
            {  if(Msg!=null)
                this.Controls.Add(new LiteralControl(Msg));


    When I edite page in the browser and try to edit any of provider/consumer  an error appear.

    Any help?

    Thursday, April 27, 2017 3:40 PM

All replies