views:

15

answers:

0

I have a page with a silverlight app on it. Embedded in my page is an authentication key which the silverlight app will need to do all web service requests. So onload the silverlight app needs to get the key and do an initial connect to a WCF service. The problem is that its very unpredictable whether the page or the silverlight will load first, so I cant use the pages onload= event because sometimes the silverlight is null, and I cant use silverlights initialize method because sometimes the js function is still undefined - which I presume means its loading the page from cache, which loads the SL, and only then parsing the JS.

Thanks.