0
votes

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

1

1 Answers

0
votes

Do you really have the AJAX Control Toolkit assembly in the bin directory of your ASP.NET application?

If you've there already, have you checked that added reference is compiled for your Microsoft .NET Framework version?

Maybe you've an old version, or you've a newer version and you're using a wrong version of ASP.NET.