Is there a Silverlight control for embeding into a ASP.NET Web form
-
This may be a trivial question but I'm completely new to Silverlight and right now I just want to know if I can embed a Silverlight control in my "classic" AST.NET (3.5) WebForm page? Googled for samples but no result.
_____________________________ ...and justice for all
-
This may be a trivial question but I'm completely new to Silverlight and right now I just want to know if I can embed a Silverlight control in my "classic" AST.NET (3.5) WebForm page? Googled for samples but no result.
_____________________________ ...and justice for all
You cannot embed silverlight control individually. You need to generate .xap file from the silverlight page/control and then you can easily embed it in aspx page as an object. Find following code to embed .xap file.
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="ClientBin/SLNetWCF.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&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><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>HTH
Jinal Desai - LIVE Experience is mother of sage....
-
This may be a trivial question but I'm completely new to Silverlight and right now I just want to know if I can embed a Silverlight control in my "classic" AST.NET (3.5) WebForm page? Googled for samples but no result.
_____________________________ ...and justice for all
d00_ape wrote:
Googled for samples but no result.
You cannot do this and that is why you found no results. As is posted in the other answer, you can embed your xap control inside the page. You can probably search for some controls for Asp.net which do something similar to what you are using in Silverlight.
My signature "sucks" today