名称' AjaxControlToolkit'在当前上下文中不存在

时间:2016-03-30 13:35:55

标签: asp.net wcf

此代码以wcf Service1.svc.cs

编写
    using System;
    using System.Configuration;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.Serialization;
    using System.ServiceModel;
    using System.ServiceModel.Web;
    using System.ServiceModel.Activation;
    using System.Text;
    using System.Data;
    using System.Data.SqlClient;
    using System.Web.Script.Serialization;

     [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
   public class enggcollegelist : ICRUD
    {

       public List<string> autobranches(string brname)
       { List<string> lstbranches = new List<string>();
        connection = new SqlConnection(ConnectionString);
        command = new SqlCommand("select branchname from tblenggbranchnames "+"where branchname LIKE '%'+@branches+'%' ",connection);
        connection.Open();
        command.Parameters.AddWithValue("@branches",brname);
        resultReader = command.ExecuteReader();
        while (resultReader.Read())
        {
            string items  =AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(resultReader["branchname"].ToString());

            lstbranches.Add(resultReader["branchname"].ToString());
        }
        connection.Close();
        return lstbranches;

    }

在上面的代码&#34; AjaxControlToolkit&#34;不接受。 我已下载ajax工具包并已安装,并在工具包中添加引用。 但同样的问题也存在。

0 个答案:

没有答案