Skip to main content
Home Forums General Silverlight Hosting and Streaming Silverlight Widget - reference external xap file in <object> tag?
6 replies. Latest Post by crowcoder on December 22, 2008.
(0)
crowcoder
Member
5 points
7 Posts
12-22-2008 10:47 AM |
Is it possible to give someone some <object> tag code that they can drop on any web page and NOT give them a xap file? I'd like to simplify the widget setup for my users and reference a xap file on my server.
bryant
Star
9937 points
1,629 Posts
12-22-2008 11:44 AM |
You could code your own ASP.NET server control that would contain the references and build the object tag for the user with all the required parameters. You could even distribute a javascript file which would do the same thing. Then just have the user add the server object or the javascript to their page (you could even host the javascript on your server along with the xap).
12-22-2008 11:49 AM |
I can't assume they are using asp.net. I'd like anyone with an HTML file to drop my <object> code into their markup to get my widget. I guess I just have to include instructions for placing the xap file as well.
12-22-2008 12:31 PM |
So I'd go with the second option then, use a javascript file hosted where the xap is at. You could do something similar to WMD where you just add the js reference and create a div to host the content.
12-22-2008 1:29 PM |
I can create an object tag dynamically easily enough, but that doesn't help me set the source parameter to another domain (and make it work). I found another post with the same issue I am having. My answer is rapidly aproaching "Can't do it".
http://silverlight.net/forums/p/45811/127683.aspx
12-22-2008 1:41 PM |
The last post in that thread has an important idea. Take a look at the live silverlight hosting. The second option is basically the same idea as what I'm suggesting. They create the control via javascript and special tag.
12-22-2008 1:50 PM |
I don't like the IFrame idea. I will check out silverlight hosting though. Thank you very much for your time.