ajax悬停菜单扩展程序控制问题。 [英] Problem with ajax hover menu extender control.

查看:58
本文介绍了ajax悬停菜单扩展程序控制问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我下载了ajax工具包并添加到我的工具箱中。但是当我在我的网络表单上拖放ajax控件时,我得到以下错误。



1.无法加载文件或程序集''AjaxControlToolkit''或其中一个依赖项。该系统找不到指定的文件。

2.未知服务器标签''cc1:HoverMenuExtender。



这是我的.aspx代码。



 <%@     Page    语言  =  C#    AutoEventWireup   =  true   < span class =code-attribute>   CodeFile   =  Default.aspx.cs   继承  =  _默认   %>  
<%@ 注册 汇编 = AjaxControlToolkit 命名空间 = AjaxControlToolkit TagPrefix = cc1 < span class =code-attribute> %>
< !DOCTYPE html PUBLIC - // W3C // DTD XHTML 1.0 Transitional // EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd >

< script < span class =code-attribute> runat
= server >
protected void RadioButtonList1_SelectedIndexChanged( object sender,EventArgs e)
{
Label1.ForeColor = System.Drawing.Color.FromName(RadioButtonList1.SelectedItem.Text);
}
< / script >

< html xmlns = http://www.w3.org/1999/xhtml >
< ; head runat < span class =code-keyword> = server >
< title > 无标题页< / title >
< style 类型 = text / css >
PanelCSS
{
可见性 hidden;
}
< / style >
< / head >
< body >
< span class =code-keyword>< 表格 id = form1 runat = 服务器 >
< div style = 身高:504px >
< h2 < span class =code-attribute> style = color:DeepPink; font-style:italic; > Ajax Control Toolkit示例:使用HoverMenuExtender < / h2 >
< hr width = 550 align = left 颜色 = 粉红色 / >
< span class =code-keyword>< asp:ScriptManager

ID = ScriptManager1

runat = server >
< / asp:ScriptManager >
< cc1:HoverMenuExtender

< span class =code-attribute> ID = HoverMenuExtender1

runat = ser ver

TargetControlID = Label1

< span class =code-attribute> PopupControlID = Panel1

< span class =code-attribute> PopupPosition = 底部 >
< / cc1:HoverMenuExtender > ;
< br / > < br / >
< asp:Label

ID = Label1

runat = server

文本 = 颜色可变标签。
< span class =code-attribute>
字体大小 = XX-Large

字体名称 = Comic Sans MS

< span class =code-attribute> >
< / asp:标签 >
< asp:Panel

ID = Panel1

runat = server

宽度 = 300

BorderColor = Gray

BorderWidth = 1
< span class =code-attribute>
CssClass = PanelCSS

>
< asp:RadioButtonList

ID = RadioButtonList1

runat = server

< span class =code-attribute> RepeatColumns = 3

OnSelectedIndexChanged = RadioButtonList1_SelectedIndexChanged

< span class =code-attribute> AutoPostBack = true

< span class =code-attribute> >
< asp:ListItem > Tan < / asp:ListItem >
< asp:ListItem > Crimson < / asp:ListItem < span class =code-keyword>>
< asp:ListItem > DarkBlue < / asp:ListItem >
< asp:ListItem > ; SeaGreen < / asp:ListItem >
< asp:ListItem > OrangeRed < / asp:ListItem >
< asp:ListItem > Magenta < / asp:ListItem >
< asp:ListItem > DeepPink < / asp:ListItem >
< / asp:RadioButtonList >
< / asp:Panel >
< / div >
< /表格 >
< / body >
< / html >







请解决我的问题。



问候,



N.SRIRAM

解决方案

尝试使用 ToolkitScriptManager 而不是 ScriptManager 。如果仍然无法解决问题,请检查您的Ajax版本或再次将Ajaxtoolkit重新加载到您的工具箱。

它的工作正常。



如果未解决,请指定确切的错误。



Happy Coding


尝试这个 [ ^ ]。

非常翔实的帖子。它对我和初学者也很有帮助。看看这个链接,它也有一个很好的帖子,对ASP.Net中的Ajax Toolkit HoverMenuExtender控件有很好的解释:



http://mindstick.com/Articles/037b835c-a670-4200-8096-77771cf006e1 /?Ajax%20Toolkit%20HoverMenuExtender%20Control%20in%20ASP.Net[^]



Thanks!


Hi All,
I downloaded the ajax tool kit and added to my tool box. But when I drag and drop ajax controls on my web form,The below errors I am getting.

1. Could not load file or assembly ''AjaxControlToolkit'' or one of its dependencies. The system cannot find the file specified.
2. Unknown server tag ''cc1:HoverMenuExtender.

Here is my .aspx code.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        Label1.ForeColor = System.Drawing.Color.FromName(RadioButtonList1.SelectedItem.Text);
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <style type="text/css">
        .PanelCSS
        {
            visibility:hidden;
         }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div style="height: 504px">
    <h2 style="color:DeepPink; font-style:italic;">Ajax Control Toolkit Example: Using HoverMenuExtender</h2>
        <hr width="550" align="left" color="Pink" />
        <asp:ScriptManager

            ID="ScriptManager1"

            runat="server"   >
        </asp:ScriptManager>
    <cc1:HoverMenuExtender

            ID="HoverMenuExtender1"

            runat="server"

            TargetControlID="Label1"

            PopupControlID="Panel1"

            PopupPosition="Bottom"   >
        </cc1:HoverMenuExtender>
        <br /><br />
        <asp:Label

            ID="Label1"

            runat="server"

            Text="Color changeable label."

            Font-Size="XX-Large"

            Font-Names="Comic Sans MS"

            >
        </asp:Label>
        <asp:Panel

            ID="Panel1"

            runat="server"

            Width="300"

            BorderColor="Gray"

            BorderWidth="1"

            CssClass="PanelCSS"

            >
            <asp:RadioButtonList

                ID="RadioButtonList1"

                runat="server"

                RepeatColumns="3"

                OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"

                AutoPostBack="true"

                >
                <asp:ListItem>Tan</asp:ListItem>
                <asp:ListItem>Crimson</asp:ListItem>
                <asp:ListItem>DarkBlue</asp:ListItem>
                <asp:ListItem>SeaGreen</asp:ListItem>
                <asp:ListItem>OrangeRed</asp:ListItem>
                <asp:ListItem>Magenta</asp:ListItem>
                <asp:ListItem>DeepPink</asp:ListItem>
            </asp:RadioButtonList>
        </asp:Panel>
    </div>
    </form>
</body>
</html>




Please solve my problem.

Regards,

N.SRIRAM

解决方案

Try using ToolkitScriptManager instead of ScriptManager. If still it does not solve the issue then check with your Ajax version or reload Ajaxtoolkit again to your toolbox.
Its working fine on my side.

Specify exact error in case it is not resolved.

Happy Coding


Try THIS[^].


Very informative post. Its really helpful for me and beginner too. Check out this link too its also having a nice post with wonderful explanation on Ajax Toolkit HoverMenuExtender Control in ASP.Net:

http://mindstick.com/Articles/037b835c-a670-4200-8096-77771cf006e1/?Ajax%20Toolkit%20HoverMenuExtender%20Control%20in%20ASP.Net[^]

Thanks!


这篇关于ajax悬停菜单扩展程序控制问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆