Animation extender in ajax example in Asp.net || Ajax Toolkit Animation Extender control sample in Asp.net


The following article is showing about Ajax Animation Extender control in Asp.net:
Onething you should remember that, if you use any Ajax toolkit controls in your web page then you must add ScriptManager tag.
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
Create a Web Form named as "AnimatedExtender.aspx".
Copy and paste the following code in your .aspx section.

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:ScriptManager ID="ScriptManager1" runat="server" />

    <asp:LinkButton ID="lnkbtn" OnClientClick="return false;" runat="server">Start Animation</asp:LinkButton>

        <br />
             <asp:Panel ID="Message" runat="server" Width="250px">

     <h2 style="color:#FFF;">nareshkamuni.blogspot.com</h2>

    </asp:Panel>
        <br />
        <asp:AnimationExtender ID="AnimationExtender1" runat="server"TargetControlID="lnkbtn">
        <Animations>
        <OnClick>
             <Sequence>
             <Color 
                 AnimationTarget="Message" 
                 Duration="3" 
                 Property="style" 
                 PropertyKey="backgroundColor"
                 StartValue="#CE0E3F" 
                 EndValue="#FFFFFF" /> 
             </Sequence>
         </OnClick>
        </Animations>
        </asp:AnimationExtender>
    </div>
    </form>
</body>
</html>

Then run the application and see your Output.

0 comments:

Post a Comment