Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 429
  • Last Modified:

Using AJAX DropShadow control - can't set Opacity

Just updated to the latest AJAX Toolkit and now no matter what I set the Opacity figure at (0.1 to 1), it is like the default setting is 1 and cannot be changed.  The shadow is simply black.  I need it to be Opacity of .25.  

I updated from a 2010 toolkit version, to the Jan 2013 toolkit.

The issue exists for all my projects, and exists in Firefox, Chrome and IE.

Is this a bug?


<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeFile="Default.aspx.vb" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Welcome to ASP.NET!
    </h2>
    <p>
        To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">www.asp.net</a>.
    </p>
    <p>
        You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&amp;clcid=0x409"
            title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
    </p>

    <asp:Panel ID="Panel1" runat="server" BackColor="Orange" ForeColor="White">
    Testing 123
    </asp:Panel>

    <asp:DropShadowExtender ID="DropShadowExtender1" runat="server" TargetControlID="Panel1" Rounded="true" Opacity=".1">
    </asp:DropShadowExtender>
    
    
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
</asp:Content>

Open in new window

0
badzster
Asked:
badzster
  • 4
  • 2
2 Solutions
 
badzsterAuthor Commented:
Here is a screenshot of the DropShadow
Untitled.png
0
 
badzsterAuthor Commented:
Using Visual Studio 2010 - SP1 if that helps
0
 
Roopesh ReddyCommented:
Hi,

You need to use AjaxToolKitScriptManager instead of ScriptManager!

Check the sample code -

 <asp:Panel ID="Panel1" runat="server" BackColor="Orange" ForeColor="White">
        Testing 123
    </asp:Panel>

<asp:ToolkitScriptManager runat="server">
</asp:ToolkitScriptManager>

<asp:DropShadowExtender ID="DropShadowExtender1" runat="server" TargetControlID="Panel1" Rounded="true" Opacity=".25">
</asp:DropShadowExtender>

Open in new window


Shadow
Moreover, installing AjaxConrolToolKit from Nuget is easy and safe - http://roopeshreddy.wordpress.com/2012/10/07/installingconfiguring-ajaxcontroltoolkit-through-nuget/

Hope it helps u...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
badzsterAuthor Commented:
Spot on!  Thanks very much...that helped a great deal.  

In the example I did use ScriptManager instead of the asp:ToolkitScriptManager...but even changing to asp:ToolkitScriptManager didn't change the shadow.  However I used the code sample you attached and it did work...turns out that the shadow will cast normally (be opaque) if you specify the opacity as .25, .5, .75, 1

If you specify .1, .2, .7 etc, then the shadow appears as it would if you entered 1.  

Your answer helped me discover this.  Thankyou.
0
 
Roopesh ReddyCommented:
Hi,

Glad it helped you. So please mark it as answer then!
0
 
badzsterAuthor Commented:
Explanation
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now