How to host a Silverlight Application using JavaScript?
We all know the process to embed a Silverlight application inside a Webpage using div and object tag. When we create a new Silverlight appli...- Article authored by Kunal Chowdhury on .
We all know the process to embed a Silverlight application inside a Webpage using div and object tag. When we create a new Silverlight appli...- Article authored by Kunal Chowdhury on .
<div id="silverlightControlHost"> <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> <param name="source" value="ClientBin/SilverlightApplication1.xap" /> <param name="onError" value="onSilverlightError" /> <param name="background" value="white" /> <param name="minRuntimeVersion" value="4.0.60310.0" /> <param name="autoUpgrade" value="true" /> <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.60310.0" style="text-decoration: none"> <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style: none" /> </a> </object> <iframe id="Iframe1" style="visibility: hidden; height: 0px; width: 0px; border: 0px"> </iframe> </div>
<div id="silverlightControlHost"> <script type="text/javascript"> Silverlight.createObject( "ClientBin/SilverlightApplication1.xap", // source silverlightControlHost, // parent element "slPlugin", // id for generated object element { width: "100%", height: "100%", background: "white", version: "4.0.60310.0" }, { onError: onSilverlightError }, "context" // context helper for onLoad handler. ); </script> </div>
Thank you for visiting our website!
We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.
We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.