You can force Silverlight interop to call the JS method and get its return value using the following:
string stringValue = (string)HtmlPage.Window.Invoke("myJSMethod");
where myJSMethodreturns the built-in key. But if you insert the key anyway, why not just paste in <object><param>s?
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="myKey" value="myKeyValue"/>
...
</object>
source
share