AJAX - 动画扩展器

发布于 12-08 02:55 字数 2364 浏览 1 评论 0原文

我正在使用 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>

I am using VS 2010 to create a simple animation, however run-time getting following error!!

Please help me to proceed further !!

Parser Error Message: The base class includes the field 'ToolkitScriptManager1', but its type (AjaxControlToolkit.ToolkitScriptManager) is not compatible with the type of control (AjaxControlToolkit.ToolkitScriptManager).

Source Error:

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

Source File: /HomeLoggedin.aspx Line: 23


Source code

<%@ 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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

逆光下的微笑2024-12-15 02:55:28

我在项目中引用的 Ajax 工具包版本错误。一旦我将 dll 引用更改为所需版本,就消除了错误......

I had the wrong version of the Ajax toolkit referenced in the project. Once I change the dll refernce to required version, got rid of the error...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文