2

I am unable to get the List Search Extender from the Ajax Control Toolkit to work correctly. After inserting my WebPart to the page, I get the error: "Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified."

I followed the installation instructions for Visual Studio 2010 as found here. I see the AjaxControlToolkit listed in the references section of my solution and I have registered the assembly as shown in my code below.

*EDIT: Additionally, the assembly shows up in the GAC and I added a screenshot of the assemblies in my project package and the corresponding safe control in the Web.config

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

<asp:ListBox ID="VendorSelector" runat="server"></asp:ListBox>
<asp:ListSearchExtender id="LSE" runat="server"
  TargetControlID="VendorSelector"
  PromptText="Type to search"
  PromptCssClass="ListSearchExtenderPrompt"
  PromptPosition="Top"
  AutoResetTimeout="0"
  QueryPattern="Contains"
  IsSorted="true"/> 

GAC

Package

WebConfig

1
  • 2
    Is the assembly in the GAC? If so, you need to use the full 4 part assembly name (the one with the PublicKeyToken and stuff).
    – James Love
    Aug 5, 2012 at 21:28

2 Answers 2

1

I added the version and public key of the assembly in my Register statement. No more runtime errors.

2
  • 1
    I should also note that beware when adding assemblies to the project using that interface - if any other solutions rely on that assembly and you retract your solution, it will pull out that assembly from the GAC and break the other solutions.
    – James Love
    Aug 6, 2012 at 15:38
  • also when adding any dll to the gac allway do an iis reset!
    – Ali Jafer
    Oct 15, 2012 at 8:03
1

It appears that the version of the AJAX toolkit you are using is incorrect. I had this issue and after downloading and installing the correct version for my target sharepoint installation, and it worked. Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.