views:

324

answers:

1

I created a asp.net application.How can i integrate a silver light tag to my asp.net project.When i googled i got some of the examples for 2.0 . Where can i get an example solution for silver light 3.0.

Note : when i searched for the same in google . i got a solution to add a system.web.silverlight.dll.That is present in my %win%/Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Server\system.web.silverlight.dll

for 3.0 %win%/Program Files\Microsoft SDKs\Silverlight\v3.0\Libraries\Server\System.ServiceModel.PollingDuplex.dll is there no system.web.silverlight.dll .

What i need to do,to integrate the silver light to my asp.net?

A: 

You don't want to add those assemblies to your asp.net website as they are for development of the Silverlight project.

All you need is:

  1. Silverlight 3 plug-in the user's machine
  2. a XAP file which is the compiled Silverlight 3 binary
  3. Latest Silverlight.js
  4. Some markup in your html or aspx page like example below (ClientBin/BIA1.XAP is the binary used)

It's much easier to just install the Silverlight Tools for VS2008 and let set it up for you by adding a New Silverlight project to your solution, it will ask you if you want to integrated to your existing asp.net website with a test html file created. Download here

<object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%">     
  <param name="source" value="ClientBin/BIA1.xap"/>
  <param name="onerror" value="onSilverlightError" />
  <param name="background" value="white" />
  <param name="minRuntimeVersion" value="3.0.40624.0" />
  <param name="autoUpgrade" value="true" />
  <a href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=3.0.40624.0" style="text-decoration: none;">
      <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
  </a>
 </object>
Paully

related questions