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

Have Webpart A & B that are derived from AbstractWebpart. Here is the scenario....add and configure several A/B webparts to the page. There is one webpart property that i want to be able to configure one of two ways. Either 1) each webpart can configure the property individually or 2) the user can configure the webparts so that the property is set on a page basis...i.e. if you set the property of one all webparts on the page get set.

I have been thinking about how to do this but am a bit stumped....looking for some guidance from the gurus out there.


share|improve this question
up vote 1 down vote accepted

From a Web Part you can reach other Web Parts in the same zone at least, WebPart.Zone Property.
Then you can set the property on all in the same zone, for example like this:

if (Zone == null) return;
  Where(webPart => webPart is MyWebPart).ToList().
  ForEach(webPart => ((MyWebPart)webPart).MyProperty = "Hello, world!");

You can also use Web Parts Connections to connect the Web Parts together. Although I personally find this a bit cumbersome.

Another solution is to implement updating of properties through querystring/request parameters.

share|improve this answer

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.