Recommended

Skip Navigation LinksHome / Tips / View Tip

Tip: Avoid parameters without values in the object element

+ Add to SilverlightShow Favorites
0 comments   /   posted by Martin Mihaylov on Nov 28, 2008
(0 votes)
Categories: General , Controls and UI

When using the object element to display our Silverlight application, we can use parameters to configure it (source, onerror, background, minRuntimeVersion and etc.):

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

Some of them are predefined in the automatically created TestPages, but we can also add additional parameters like initParams, onload and etc.

Be sure always to set the value of each parameter, otherwise browsers different than Internet Explorer will not be able to render the object element properly and the "Install Silverlight" badge will appear instead of the Silverlight application. This issue could be a showstopper when embedding Silverlight applications into a web page and is not related to the Silverlight plug-in.

 

That's it!

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 2 and 1 and type the answer here:

Help us make SilverlightShow even better and win a free t-shirt. Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to hear from you! Need a material (article, tutorial, or other) on a specific topic? Let us know and SilverlightShow content authors will work to have that prepared for you. (hide this)