Note that there are some explanatory texts on larger screens.

plurals
  1. POSilverlight call from aspx no longer working
    primarykey
    data
    text
    <p>I'm fixing up some old code that uses silverlight along with arcgis. The silverlight portion broke over time. The code that's originally used is:</p> <pre><code>&lt;asp:Silverlight ID="xamlMain" runat="server" Source="ClientBin/ControlPoints.xap" MinimumVersion="3.0.40624.0" Width="100%" Height="100%" /&gt; </code></pre> <p>and the way it was called </p> <pre><code>function RefreshControlPointLayer() { var slControl = document.getElementById("xamlMain"); slControl.Content.RefreshControlPointsLayer(); } </code></pre> <p>I would get "slControl.Control is undefined." After looking up the silverlight call (I have no prior experience or knowledge of silverlight) I found that the way it's being called is old, so I changed it to the new object way.</p> <pre><code>&lt;object type="application/x-silverlight-2" data="data:application/x-silverlight," width="100%" height="100%"&gt; &lt;param name="source" value="ClientBin/ControlPoints.xap" /&gt; &lt;param name="id" value="xamlMain" /&gt; &lt;param name="runat" value="server" /&gt; &lt;param name="onError" value="onSiliverError" /&gt; &lt;param name="background" value="white" /&gt; &lt;param name="minRuntimeVersion" value="3.0.40624.0" /&gt; &lt;param name="autoUpgrade" value="true" /&gt; &lt;a href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=4.0.60310.0" style="text-decoration:none"&gt; &lt;img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/&gt; &lt;/a&gt; &lt;/object&gt;&lt;iframe id="_sl_historyFrame" style='visibility: hidden; height: 0px; width: 0px; border: 0px'&gt;&lt;/iframe&gt; </code></pre> <p>and I call it by just calling the function "RefreshControlPointsLayer()." In chrome's inspector console I'm able to see this code</p> <pre><code>function refreshControlPointsLayer() { window.opener.RefreshControlPointLayer(); return false; } </code></pre> <p>but in firebug all I can is</p> <pre><code>&lt;td align="center"&gt; &lt;span id="ctl00_Main_gv_import_ctl21_ImportStatus" disabled="disabled" style="color:Red;"&gt;&lt;/span&gt; &lt;/td&gt;&lt;td&gt;10X&lt;/td&gt;&lt;td&gt;5570.47000&lt;/td&gt;&lt;td&gt;1244.33900&lt;/td&gt;&lt;td&gt;473.69900&lt;/td&gt;&lt;td&gt;BRK-10X bk 25596 pg ?? &lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; </code></pre> <p>The function refreshControlPointsLayer() doesn't even show up in firebug. But both tell me "window.opener.refreshControlPointsLayer is not a function." I've opened the xap file but all it contained was dll's. </p> <p>Am I calling the silverlight object wrong? Has anyone ever had anything similar happen to them? Would any one off the top of there head know how I should properly call a xap file from an aspx page so I can use it's functions? thank you for any help. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload