How to Embed Silverlight Content in Almost Any Web Page


Catherine Heller has written up a great post that describes a new feature in Silverlight Streaming. Having uploaded a Silverlight application to the Silverlight Streaming service, you can now embed it in any web page as an <iframe>.


If you want to include a cool Silverlight gadget on your blog, but your blog engine doesn’t support custom scripts or XAML files, this will work well. It’s also perfect for a social networking site like Facebook, since you can create an application that hosts an <iframe>.


Here’s a little example that demonstrates this:


All it took to embed this was one element:

<iframe src=”http://silverlight.services.live.com/invoke/32/SlLogo/iframe.html” 
frameborder=”0″ width=”258″ height=”100″ scrolling=”no” />

Of course, you’re welcome to steal this one-liner to add some Silverlight “bling” to your own site 🙂


In the next post, I’ll walk through a step-by-step guide to uploading an Expression Blend project to Silverlight Streaming.

Comments (25)

  1. Anonymous says:

    Tim Sneath からです。 How to Embed Silverlight Content in Almost Any Web Page Silverlight を作成した後、それを直接 Web

  2. Anonymous says:

    Tim great little snippet to help us get a little Silverlight love on our blogs.  Maybe we can get a transparent one so that it doesn’t look so bad on non-white blogs :).

    As I pointed out in my post http://www.brockett.net/?p=204 it’s all about getting Silverlight down to the client machine and "blog bling" and small little web apps is a great way to spread the platform.

  3. Anonymous says:

    You’ve been kicked (a good thing) – Trackback from DotNetKicks.com

  4. Anonymous says:

    Silverlight is only for UI and graphics design? Can it be used for normal web application system? The most of example that I found on internet are for designing things and how to make UI look good. I didn’t see any example about manipulating with database.

    I’m very new in Silverlight and still learning.. I think that it’s very interesting…. might be better than flash..

  5. Anonymous says:

    Silverlight Cream for August 1, 2007

  6. i have plugged in Homer Simpson as Silverlight in weblogs.asp.net page.

    You need all scripts inline and the xaml as text/xaml script

  7. Anonymous says:

    To answer Michael Sync, yeah, it’s much more than UI. There are tons of resources that are non-UI for Silverlight.

    As for the iframe, this doesn’t work on older browsers like Netscape 4 and such, will it? I didn’t think the <iframe> element was widely implemented into non-IE browsers until a few years ago, even though it was in the standards of the day.

    And the "don’t worry about older browsers" cannot be an excuse, because not everyone of the 4 billion computers out there is a top of the line Dell, some are older computers because that’s all people can afford.

  8. Anonymous says:

    I’m having problems getting this to work in my WordPress blog. I’m guessing it’s because WordPress parses iFrames incorrectly but I’m not entirely sure. You can read more about it here: http://blog.pinkandyellow.com/silverlight/silverlight-posting-test-20070808/

    If anyone has any more luck than me doing this I’d much appreciate the help.

    mor10

  9. Anonymous says:

    Please disregard my earlier comment. Turns out the reason why the code above doesn’t work in WordPress is because WordPress needs a proper close to the <iframe> command. If you try the shorthand /> WordPress will insert an </iframe> right after the src call leaving the rest of the code out in the cold. This causes massive problems.

    lesson learned.

  10. Anonymous says:

    So does this mean I can’t just include a script from another domain?

  11. Anonymous says:

    Very cool.  We are super excited about silverlight at Triggit. Can’t wait to see all the cool stuff people build

  12. Anonymous says:

    Tim Sneath : How to Embed Silverlight Content in Almost Any Web Page &lt;iframe src="http://silverlight.services.live.com/invoke/32/SlLogo/iframe.html&quot;

  13. Anonymous says:

    以前 Tim Sneath のブログ で紹介されていましたが、Windows Live の Silverlight Streaming サービス を利用すると、通常の HTML に iframe を使ってSiverlight

  14. Anonymous says:

    以前 Tim Sneath のブログ で紹介されていましたが、Windows Live の Silverlight Streaming サービス を利用すると、通常の HTML に iframe を使ってSiverlight

  15. Anonymous says:

    さて RIA 展開の柱 Flash に .NET , VS 側からアプローチする Microsoft Silverlight 1.0 Final のアナウンスが…

  16. Anonymous says:

    This is quite handy when trying to embed silverlight in a site when having no access to code, etc.

    For using this in your normal website isn’t very efficient.

    Wherefore we created a .NET control for use in our own sites. See here: http://web-snippets.blogspot.com/2007/09/embedding-silverlight-using-net-control.html

  17. Anonymous says:

    via Tim Sneath: How to Embed Silverlight Content in Almost Any Web Page

  18. Anonymous says:

    Over at Remy’s space he’s posted a collection of screenshots of the Silverlight applications being delivered

  19. Anonymous says:

    &#160; This is a simple, and completely unofficial, inventory of many cool Silverlight applications…

  20. Anonymous says:

    This is a simple, and completely unofficial, inventory of many cool Silverlight applications that use…

  21. Anonymous says:

    This is a simple, and completely unofficial, inventory of many cool Silverlight applications that use…

  22. Anonymous says:

    This is a simple, and completely unofficial, inventory of many cool Silverlight applications that use…

  23. Anonymous says:

    I have been meaning to start video blogging (vlogging) for some time. I think you can get stuff across

Skip to main content