0

I deploy my silverlight .xap file to a document library.I'd like to add the silverlight using the object control,like below

param name="source" value="{SiteUrl}/SLDocLib/HelloWorldSilverlightApplication.xap"

but the SharePoint token {SiteUrl} doesn render as the current web url,I change the {SiteUrl} to ~site,it deos not render to the current site url as well, can anyone shine some light on this?

1 Answer 1

3

why dont you put just the relative link in it? Then it will work in all zones, assuming that you have multiple zones. Than the {siteUrl} token is not needed. Apart from that, I believe that that token doesnt work, only works server-side(for example in masterpages, before the masterpage is rendered). If you check your web.config. If you really want to work this way, you might use some javascript (jquery/javascript client object model)

In addition to that: when using the SharePointclient-side object model in your silverlight application, it probably will not work. You need to load the xap via the silverlight webpart to make use of the current context. Otherwhise you may need to change your code and explicitedly open your SiteCollection by inserting the full URL.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.