What is the solution for “The Type or namespace &#

2019-06-17 07:47发布

 Error 3 The type or namespace name 'AjaxControlToolkit' could not be found
 in the global namespace (are you missing an assembly reference?)   
 D:\My App\table\PopUpdata.aspx.designer.cs 58 27 table.

I have Declared this javascript but what is the problem.

<%@ Page Title="Show Data From Menu" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PopUpdata.aspx.cs" Inherits="table.PopUpdata" %>

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

5条回答
冷血范
2楼-- · 2019-06-17 08:06

Way to reference a dll is:

  1. In Solution Explorer, select the project.
  2. On the Project menu, click Add Reference. The Add Reference dialog box opens.
  3. Select the tab indicating the type of component you want to reference. (If you don't find your .dll in the list, then go to the browse tab and find it in your directory)

An article on MSDN to include installed libraries.

an There is another way to do it.

查看更多
我想做一个坏孩纸
3楼-- · 2019-06-17 08:12

You're missing an assembly reference. So you need to reference AjaxControlToolkit.dll in your project.

查看更多
smile是对你的礼貌
4楼-- · 2019-06-17 08:14

This is general issue of dll

for solving this you must have 3 dll in your Bin folder

1--AjaxControlToolkit.dll

2--AjaxControlToolkit.dll.refresh (Refresh file)

3--AjaxControlToolkit (Program Debug database)

enter image description here

Now just add the AjaxControlToolkit.dll refrence in your application.

查看更多
我欲成王,谁敢阻挡
5楼-- · 2019-06-17 08:21

To have the needed references for AjaxControlToolkit

Right Click project/solution > Manage NuGet Packages..>install Ajax control Toolkit.

This will add needed assemblies to your solution.

查看更多
地球回转人心会变
6楼-- · 2019-06-17 08:32

I have faced the same issue. I have deleted all the files from the bin folder and then added the files back to the folder. It worked successfully. Hope it resolves your issue.

查看更多
登录 后发表回答