---
title: "Ajax Toolkit AnimationExtender Control in ASP.Net"  
description: "The AnimationExtender control plays animations whenever a specific event like OnLoad, OnClick, OnMouseOver, or OnMouseOut is raised by the target cont"  
author: "Pushpendra Singh"  
published: 2010-12-06  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/254/ajax-toolkit-animationextender-control-in-asp-dot-net  
category: "ajax"  
tags: ["ajax"]  
reading_time: 2 minutes  

---

# Ajax Toolkit AnimationExtender Control in ASP.Net

The AnimationExtender [control](https://yourviews.mindstick.com/view/83439/bipartisan-gun-control-bill-passed-in-us-after-decades) plays [animations](https://www.mindstick.com/forum/160680/how-to-use-css-transitions-and-animations-in-the-webpage) whenever a specific event like OnLoad, [OnClick](https://www.mindstick.com/forum/12718/onclick-for-hyperlink), OnMouseOver, or OnMouseOut is raised by the target control.\

**[Animation](https://www.mindstick.com/articles/13040/seven-helpful-tips-to-start-and-grow-an-animation-video-company) [Properties](https://yourviews.mindstick.com/view/81845/now-it-s-possible-to-predict-properties-of-any-molecule):**

· **TargetControlID** - ID of the target control whose [events](https://www.mindstick.com/blog/102/events-in-c-sharp) are used to animate.

· **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

## Code:

```
 <%-- ScriptManager control manages client script for AJAX enabled ASP.NET pages.This enables partial-page rendering and Web-service calls.You have to used this if you want to use ajax control--%><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <%-- Add the animation extender and use the animation tag-%><cc1:AnimationExtender ID="AnimationExtender1" runat="server" TargetControlID="Button1"><Animations> <OnClick><Sequence><Color AnimationTarget="Button1" Duration="50" StartValue="#FF0000" EndValue="#666666" PropertyKey="backgroundColor" /><EnableAction Enabled="true" /></Sequence>    </OnClick></Animations></cc1:AnimationExtender>  <asp:Panel ID="Panel1" runat="server"><asp:Button ID="Button1" runat="server" Text="Current Time" OnClick="Button1_Click" /> <asp:Label ID="Label1" runat="server" Text=""></asp:Label></asp:Panel>
```

**Run the [project](https://yourviews.mindstick.com/story/1788/things-to-ensure-your-construction-project-is-successful)**

![AjaxControl Toolkit AnimationExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/c0c7993d-c27e-49a6-aee8-e4ea3b4193d0/images/e64dd788-0db2-494a-ae09-f436a39f3ea3.png)

When you click Current time button then its color will be change.

![AjaxControl Toolkit AnimationExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/c0c7993d-c27e-49a6-aee8-e4ea3b4193d0/images/dea2a816-0fe7-47c6-b702-3e77045d5264.png)

After few [second](https://yourviews.mindstick.com/view/82433/the-second-wave-new-covid-19-vs-old-covid-19) current times is display and [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) color change into [previous](https://yourviews.mindstick.com/view/81421/unlock-2-0-is-just-like-previous-corona-lockdowns) color.

![AjaxControl Toolkit AnimationExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/c0c7993d-c27e-49a6-aee8-e4ea3b4193d0/images/0f469c9d-4bbc-467b-94ef-999fcb6555e9.png)

---

Original Source: https://www.mindstick.com/articles/254/ajax-toolkit-animationextender-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
