Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Friends,
below is my code in my aspx page. Here I call silverlight application in object tag. My requirement is that I want to overlap 'myoverlapping' div on 'silverlightControlHostContainer' div means

myoverlapping over silverlightControlHostContainer
ASP.NET
<form id="form1"  runat="server" style="height: 100%;">
    <div style="height: 100%; width: 100%">
        <div   id="silverlightControlHostContainer"  style="height: 100%; width: 100%; background-color: Aqua; z-index: 99; removed: absolute">
            <div id="silverlightControlHost" style="height: 100%; width: 100%; background-color: Aqua;
                position: absolute">
                 <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" style="height: 100%; width: 100%;background-color:Aqua;z-index:99;position:absolute"
            width="100%" height="100%">
            <param name="source" value="ClientBin/SilverlightApplication1.xap" style="background-color:Aqua;z-index:99;removed:absolute" />
            <param name="onError" value="onSilverlightError"  style="background-color:Aqua;z-index:99;removed:absolute"/>
            <param name="background" value="white" />
            <param name="minRuntimeVersion" value="4.0.50826.0" style="background-color:Aqua;z-index:99;removed:absolute"/>
            <param name="autoUpgrade" value="true" />
            <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration: none;background-color:Aqua;z-index:99;removed:absolute">
                <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight"
                    style="border-style: none;" />
            </a>
        </object>
            </div>
        </div>
        <div id="myoverlappingdiv" style="height: 100%; width: 100%; background-color: Red; z-index: 100; removed: absolute">
        </div>
    </div>
    </form>

please help me
Posted

Add below line into object Tag in your aspx page...
this param is used for rendering your object tag behind the html page....
HTML
<param name="windowless" value="true" />
 
Share this answer
 
v2
hey just set z-Index Property from Xaml file in canvas.....
 
Share this answer
 
Comments
Sangramsingh Pawar 8-Aug-12 5:31am    
Hey man i Already done that thing plz see above question
prashant patil 4987 8-Aug-12 5:32am    
ok...
try setting z-index as -1 or 0.
 
Share this answer
 
Comments
Sangramsingh Pawar 8-Aug-12 6:13am    
I tried this but not working
Prabhakaran Soundarapandian 8-Aug-12 6:21am    
set z-index in negative for silverlightControlHostContainer
prashant patil 4987 8-Aug-12 6:30am    
z-index property not working with silverlight object tag in aspx.page
Prabhakaran Soundarapandian 8-Aug-12 6:32am    
You just have the z-index in your div..not in the object tag and then try..also see this Link http://segment7.net/projects/web/z-index.html it might be useful for you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900