It is possible to base64 encode an image and deliver it as part of the html content using the <img src="data:image/gif;base64,UEsDBBQAAAgIALp9...MTs9Snj3==">
I notice that Silverlight's object tag is supposed to be something like:
<object type="application/x-silverlight"
data="data:application/x-silverlight;base64,"
width="300" height="300">
<param name="source" value="myApp.xap"/>
<object>
and it seems that I should be able to just put in this, using the same technique as with the images:
<object type="application/x-silverlight"
data="data:application/x-silverlight;base64,SOFIjoije3r8...WMDioaAAA=="
width="300" height="300">
<object>
And have it load the xap file data from the base64 encoding in the data parameter. But this doesn't work - it loads the Silverlight plugin and there are no errors in IE or Firefox, yet the xap module isn't run.
I know browsers can be very picky about syntax for this kind of thing, so I'm asking y'all.
The purpose is to embed Silverlight in a asp.net Server Control without the additional complexity for the developer of having to host the xap somewhere and to resolve the uri of the xap, etc. I'm primarily interested in loading the xap from the embedded base64 encoded string, but if that cannot be done, good solutions for simplifying the use of the Silverlight app to a single-line of code will have to do.
Thanks!