tags:

views:

31

answers:

1

Is it possible to have one MVC application that references / hosts more than one Silverlight project? If so how can I do this?

Thanks for any help in advance!

+1  A: 

In the web project properties there is a tab for Silverlight Applications. If you add the Silverlight project there it will be compiled and copied to the ClientBin folder.

Then, in your aspx page just include multiple Silverlight controls.

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
      <param name="source" value="ClientBin/Control1.xap"/>
      <param name="onError" value="onSilverlightError" />
      <param name="background" value="white" />
      <param name="minRuntimeVersion" value="4.0.50401.0" />
      <param name="autoUpgrade" value="true" />
      <a href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=4.0.50401.0" style="text-decoration:none">
          <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
      </a>
    </object>
Stephan
great! thanks for that.
bplus