1

I have two connectable webparts but i want to have them on different pages is it possible? If it is , how to i solve this??

public interface IData
{
    string Mydata { get; }

}

2 Answers 2

2

How are you connecting the two webparts together? I presume you have an interface class? this interface class needs to be in a seperate project and built. Add the interface class to the gac (dll into the assembly folder). Then add the dll to the references in both the consumer and provider webparts.

EDIT

MSDN Cross-page Web Part Connections

http://msdn.microsoft.com/en-us/library/dd585662(v=office.11).aspx

END EDIT

It is possible, check this out:

http://www.codeproject.com/Articles/37142/Connecting-Custom-Web-Parts-in-SharePoint

msdn example

http://msdn.microsoft.com/en-us/library/ff597538.aspx

question answered by me:

Connectable WebPart Problems......................?

and

Connection between 2 web parts

hope it helps :)

1

When you connect web parts you provide some information to Another Web part!

If they are on two different pages, you can use Query String to transfer information between Web Parts!

Below is an example of query string:
http://server-name/SitePages/DesiredPage.aspx?selectedId=1

So from Source Web Part you can do Response.Redirect(aboveUrl);

Now you can access it via code using Request.QueryString["selectedId"] on the destination page web part!

3
  • i have created two webparts that are connectable webparts but when i put them on different pages , they cant be connected , can i solve it?
    – Batistuta
    Dec 3, 2012 at 14:03
  • @MorskiMartin updated the answer! Dec 3, 2012 at 14:10
  • i have already created an connectable webpart , is u are not an beginner u know what an page is , i have pages , two webparts that connectd , but when uploading them on different pages they wont connect why ?
    – Batistuta
    Dec 3, 2012 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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