AJAX - 动画扩展器

时间:2011-10-04 05:30:15

标签: ajax animation asp.net-ajax ajaxcontroltoolkit

我正在使用VS 2010来创建一个简单的动画,但是运行时会出现以下错误!!

请帮我继续!!

分析器错误消息:基类包含“ToolkitScriptManager1”字段,但其类型(AjaxControlToolkit.ToolkitScriptManager)与控件类型(AjaxControlToolkit.ToolkitScriptManager)不兼容。

来源错误:

 <form id="form1" runat="server">
<div>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">  
 </asp:ToolkitScriptManager>

源文件:/HomeLoggedin.aspx行:23


源代码

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HomeLoggedin.aspx.cs" Inherits="TheEncyclopediaOnlineLibrary.HomeLoggedin" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Animation</title>
   <style type="text/css">  

    #Message {  
        width: 250px;  
        padding: 10px;     
        margin-bottom:10px;  
    }  

    </style>  
</head>
<body>
    <form id="form1" runat="server">
    <div>
       <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">  
        </asp:ToolkitScriptManager> 

        <asp:Panel ID="Message" runat="server">  
            Pay attention to me!  
        </asp:Panel> 

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

        <asp:AnimationExtender ID="AnimationExtender1" TargetControlID="lnkYellowFade" runat="server">  
            <Animations>  
                <OnClick>  
                    <Sequence>  
                    <Color   
                        AnimationTarget="Message"   
                        Duration="2"   
                        Property="style"   
                        PropertyKey="backgroundColor"  
                        StartValue="#FFFF66"   
                        EndValue="#FFFFFF" />   
                    </Sequence>  
                </OnClick>  
            </Animations>  
    </asp:AnimationExtender>

    </div>
    </form>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

我在项目中引用了错误版本的Ajax工具包。一旦我改变了dll引用所需的版本,就摆脱了错误......