Thursday, August 4, 2011

ASP.NET Menu control's submenu hides behind Silverlight

When developing ASP.NET web sites, have you ever faced to this problem where your ASP.NET Menu control's submenu hides behind Silverlight slide show or some Silverlight application you have integrated into your site and it's right below the Menu control.

Well I faced that problem and since I know that a lot developers might face this problem, thought to share the answer. The answer is pretty simple. I am writing down the code below.

<div id="silverlightControlHost">
     <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
          <param name="source" value="ClientBin/ImageSlideShow.xap"/>
          <param name="onError" value="onSilverlightError" />
          <param name="minRuntimeVersion" value="4.0.50826.0" />
          <param name="autoUpgrade" value="true" />
          <param name="background" value="transparent" />
          <param name="windowless" value="true" />
          <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.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>

Just make sure to add the highlighted lines. Hope it helps. Appreciating your feedback.

Happy Coding.

Regards,
Jaliya

1 comment:

  1. By using blank iframe as panel you can resolve this issue. For detail please check:
    http://ideveloper-dotnet.blogspot.com/2013/08/menu-is-going-behind-silverlight-control.html

    ReplyDelete