Dropshadow control: http://www.asp.net/AJAX/AjaxControlToolkit/Samples/DropShadow/DropShadow.aspx
It is both convenient and easy to use, and brings great convenience to the majority of new users. You can easily create a rounded corner shadow effect for controls such as panel (DIV). You only needCodeYou can add beautiful results for Panel1:
< ASP: Panel ID = "Pnlmain_images" Runat = "Server" Width = "885px" Height = "300px" Backcolor = "#000066" >
</ ASP: Panel >
<C0: dropshadowextenderID= "Dsecentral_content"Runat= "Server"Rounded= "True"Targetcontrolid= "Pnlmain_images"Opacity= ". 1"Trackposition= "True">
</C0: dropshadowextender>
But today we found a bug in this control: if we put a shadow panel to another shadow panel, the shadow in the panel will have a large offset, very influential, as shown in:
Code:
< ASP: Panel ID = "Panel1" Runat = "Server" Width = "885px" Height = "300px" Backcolor = "# Ffffff" >
< ASP: Panel ID = "Panel2" Runat = "Server" Width = "585px" Height = "200px" Backcolor = "#000055" >
</ ASP: Panel >
</ ASP: Panel >
< C0: dropshadowextender ID = "Dropshadowextender1" Runat = "Server" Targetcontrolid = "Panel1"
Rounded = "True" Opacity = ". 1" Trackposition = "False" >
</ C0: dropshadowextender >
< C0: dropshadowextender ID = "Dropshadowextender2" Runat = "Server" Targetcontrolid = "Panel2"
Rounded = "True" Opacity = ". 5" Trackposition = "False" >
</ C0: dropshadowextender >
:
Solution:
This is caused by the relative position offset. We only need to set an absolute positioned Div on the internal panel to <Div style = "position: absolute">:
< ASP: Panel ID = "Panel1" Runat = "Server" Width = "885px" Height = "300px" Backcolor = "# Ffffff" >
< Div Style = "Position: absolute" >
< ASP: Panel ID = "Panel2" Runat = "Server" Width = "585px" Height = "200px" Backcolor = "#000055" >
</ ASP: Panel >
</ Div >
</ ASP: Panel >
< C0: dropshadowextender ID = "Dropshadowextender1" Runat = "Server" Targetcontrolid = "Panel1"
Rounded = "True" Opacity = ". 1" Trackposition = "False" >
</ C0: dropshadowextender >
< C0: dropshadowextender ID = "Dropshadowextender2" Runat = "Server" Targetcontrolid = "Panel2"
Rounded = "True" Opacity = ". 5" Trackposition = "False" >
</ C0: dropshadowextender >
The following is the corrected one:
Here, we hope that new users who are troubled by this problem can find it here.