开发者

Placing an IFrame before the Silverlight object in aspx page fails to render the Silverlight Control

I'd like to have an IFrame a开发者_StackOverflow中文版ppear above my Silverlight control (top to bottom not Z-Order).

If I place the IFrame element before teh Form element only the IFrame appears on my screen.

To reproduce create a new Silverlight 3.0 Web Application. In you TestPage.aspx simply add:

<iframe width="600" height="200" src="http://www.google.com" />

before the lines

<form id="form1" runat="server" style="height:50%">
    <div id="silverlightControlHost">
        <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">

My complete body tag reads as such...

<body>
<iframe width="600" height="200" src="http://www.google.com" />    
<form id="form1" runat="server" style="height:50%">
<div id="silverlightControlHost">
    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="ClientBin/SilverlightAndIFrame.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="3.0.40818.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40818.0" style="text-decoration:none">
  <img src="http://go.microsoft.com/fwlink/?LinkId=108181" 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>
</form>

Sadly only the IFrame appears.


iframes require closing tags (closing with /> doesn't work) try:-

 <iframe width="600" height="200" src="http://www.google.com"></iframe> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜