views:

250

answers:

2

I'm making an ASP.NET based website in which certain pages host Silverlight controls. If I have a control in page A which needs data from another Silverlight control in page B, how would I send this data from one control to the other.

The Silverlight controls are different custom silverlight controls made by myself, then added to my ASP.NET project?

I code in C#.

A: 

One way is with the new support that MEF has for Silverlight, you can simply state that one page will [Export] the data and state on another page that you [Import] the data and MEF does all the hard work.

Take a look at this article for more information.

Timothy Walters
+1  A: 

Since the controls are not on the same ASPX page and therefore not in memory at the same time, you could pass the data on the querystring of a URL that is triggered by a HyperLink control on one page, and on the target page take the data off the querystring and pass it into the second control as a initParams.

DaveB