SIGN UP MEMBER LOGIN:    
ARTICLE

Ajax AnimationExtender Control

Posted by Raj Kumar Articles | ASP.NET Controls in C# February 01, 2008
In this article we are going to discuss about AJAX AnimationExtender control. It provides good animation effect such as moving an ASP Control to a new place, resizing it, modifying its color, or making it fade in or fade out. In this article I m going to use fade in or fade out animation.
Reader Level:
Download Files:
 

Introduction

In this article we are going to discuss about AJAX AnimationExtender control.
 
If you want to use animation to the web pages, then you have to use AnimationExtender control. It provides good animation effect such as moving an ASP Control to a new place, resizing it, modifying its color, or making it fade in or fade out. In this article I m going to use fade in or fade out animation.
 
The animation behavior can be applied with the following extender (the italic properties are optional, and the ellipses represent a generic animation description
 
TargetControlID: ID of the target control whose events are used to animate (this is also the default target of the animations)

OnLoad: Generic animation played as soon as the page is loaded.

OnClick: Generic animation played when the target control is clicked.

OnMouseOver: Generic animation played when the mouse moves over the target control.

OnMouseOut: Generic animation played when the mouse moves out of the target control.

OnHoverOver: Generic animation similar to OnMouseOver except it will stop the OnHoverOut animation before it plays.

OnHoverOut: Generic animation similar to OnMouseOut except it will stop the OnHoverOver animation before it plays.
 
First of all make a new website using Ajax Enabled website. The advantage to using Ajax enabled website is no need to add ScriptManager control on page and no need to add Ajax Control toolkit. Like this:


 
First of all drag and drop Animation control on page.

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

<asp:ScriptManager ID="ScriptManager1" runat="server" />
<cc1:AnimationExtender ID="AnimationExtender1" runat="server" TargetControlID="Image1">
<Animations>
<OnLoad>
<FadeOut Duration=".5" MinimumOpacity=".2" MaximumOpacity="1" />
</OnLoad>
<OnHoverOut>
<Sequence>
<FadeOut Duration=".5" MinimumOpacity=".2" MaximumOpacity="1" />
</Sequence>
</OnHoverOut>
<OnHoverOver>
<FadeIn Duration=".5" MinimumOpacity=".2" MaximumOpacity="1" />
</OnHoverOver>
</Animations>
</cc1:AnimationExtender>
<asp:Image runat="server" ID="Image1" ImageUrl="~/Sunset.jpg" BorderWidth="0px" Width="342px" />
 
After running result should be look like this:


 
Now check result on MouseHover on this picture. Result should be look like this:


 
For more information download source code zip file.

Login to add your contents and source code to this article
share this article :
post comment
 

thanks alot, from a long time i am looking for this. this article is really helpful and easy code. thanks

Posted by aman gandhi Feb 23, 2011

hi ..


can you suggest any idea how to close an animation extender on some event say on clicking a  radio button?

Posted by Suhani Mody Jul 29, 2010

what???

Posted by Raj Kumar Jul 16, 2009

animation extendar con

Posted by sheetal kumar Jun 24, 2009
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
Nevron Gauge for SharePoint
Become a Sponsor