Categories

Tools

bitdefender

1&1 Web Hosting

How to use the Ajax AnimationExtender control to create a zoom effect on an image


This simple example shows how to use the Ajax AnimationExtender control and Animations to create a zoom effect on an image.

Code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AnimationExtenderDemo.aspx.cs" Inherits="AnimationExtenderDemo" %>

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

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <style type="text/css">
        .photo {
            width: 150px;
            max-height: 530px;
            max-width: 800px;
        }
    </style>
</head>

<body>
    <form id="form1" runat="server">
        <div>
            <asp:ToolkitScriptManager ID="ToolkitScriptManager" runat="server"></asp:ToolkitScriptManager>
            <asp:AnimationExtender ID="AnimationExtender" runat="server" TargetControlID="Image">
                <Animations>
                    <OnClick>

                        <Sequence>
                            <Parallel Duration=".5" Fps="25">
                                <Scale ScaleFactor="1.5" Unit="px"  />
                            </Parallel>
                        </Sequence>

                    </OnClick> 
                </Animations>
            </asp:AnimationExtender>
            <br />
            <div id="photo-panel">
                <asp:Image ID="image" ImageUrl="images/Manhattan.jpg" runat="server" CssClass="photo" ToolTip="Click to enlarge the photo" />
            </div>
        </div>
    </form>
</body>
</html>

 

How to use the Ajax AnimationExtender control to create a zoom effect on an image

How to use the Ajax AnimationExtender control to create a zoom effect on an image

 

Posted in Ajax by MdmSoft

If our work has been of help, you can help us with a small donation...
Our programmers will thank you!



All information contained in this web site are the property of MdmSoft. The information is provided "as is", MdmSoft will not be liable for any misuse of the code contained in these pages, nor can it be for inaccuracies, grammatical errors or other factors that may have caused damage or lost earnings. MdmSoft is not responsible for the content of comments posted by users.
The examples in this area have the educational and demonstration purposes only, and may be copied only for your reference, but cannot be used for commercial purposes, or for any other purpose, without the express written consent of MdmSoft.
MdmSoft also reserves the right to change, without notice, to your liking this web site, the pages and its sections, and may suspend temporarily or definitely the various services included on this site.
While using this site, you agree to have read and accepted our Terms of Service and Privacy Policy.