Create Silverlight control with JavaScript, but maintain navigation -


i have number of silverlight apps hosted in asp.net web forms application based on navigation application template. company has upgraded ie11 , experiencing "white screen of death" on browser refreshes , after using button. lot of searching has me believing way solve wsod replace object tag i'm using javascript load during onload event of html body. while appear fix wsod, when navigate other pages, url in browser not update, therefore button navigates previous web page (not silverlight page). appears the generated html tag differs bit - possibly "application/x-silverlight" vs. "application/x-silverlight-2" - did note silverlight.js file contain "-2", i'm not sure why output not use it.

has dealt before , come workaround?

original code:

<div id="silverlightcontrolhost" style="padding:0px;">         <object id="silverlightclientcontrol" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">           <param name="source" value="<%=getxaplocation()%>"/>           <param name="onerror" value="onsilverlighterror" />           <param name="background" value="white" />           <param name="minruntimeversion" value="4.0.60129.0" />           <param name="autoupgrade" value="true" />           <param name="initparams" id="initparams" runat="server" value="<%=getinitialparams()%>"/>           <a href="http://go.microsoft.com/fwlink/?linkid=149156&v=4.0.60129.0" style="text-decoration:none">               <img src="http://go.microsoft.com/fwlink/?linkid=161376" alt="get microsoft silverlight" style="border-style:none"/>           </a>         </object>         <iframe id="_sl_historyframe" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>      </div> 

updated javascript version (function called in onload event of body tag):

function createsl() {             silverlight.createobjectex({                     source: "<%=getxaplocation()%>",                     parentelement: document.getelementbyid("silverlightcontrolhost"),                     id: "silverlightclientcontrol",                     properties: {                         background: "white",                         version: "4.0.60129.0",                         height: "100%",                         width: "100%"                     },                     events: {                         onerror: onsilverlighterror                     },                     initparams: "<%=getinitialparams()%>"                 });         } 

html generated object tag:

<object width="100%" height="100%" id="silverlightclientcontrol" data="data:application/x-oleobject;base64,***long string of characters***"  type="application/x-silverlight-2">           <param name="source" value="/clientbin/ticketmaintenance.xap?9/24/2015 3:51:25 pm">           <param name="onerror" value="onsilverlighterror">           <param name="background" value="white">           <param name="minruntimeversion" value="4.0.60129.0">           <param name="autoupgrade" value="true">           <param id="initparams" name="initparams" value="mataxfreestartdate=8/15/2015, mataxfreeenddate=8/16/2015">           <a style="text-decoration: none;" href="http://go.microsoft.com/fwlink/?linkid=149156&amp;v=4.0.60129.0">               <img style="" alt="get microsoft silverlight" src="http://go.microsoft.com/fwlink/?linkid=161376">           </a> </object> 

html generated javascript:

<object width="100%" height="100%" id="silverlightclientcontrol" data="data:application/x-oleobject;base64,***long string of characters***"  type="application/x-silverlight">     <param name="background" value="white">     <param name="source" value="/clientbin/ticketmaintenance.xap?9/24/2015 3:51:25 pm">     <param name="initparams" value="mataxfreestartdate=8/15/2015, mataxfreeenddate=8/16/2015">     <param name="onerror" value="__slevent0"> </object> 


Comments