views:

270

answers:

3

I am using a master page...

Then there is an .aspx that uses this masterpage..

what i want to use is the ajax NumericUpDownExtender but i am getting an error from the start when i put this in my masterpage

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>

The error message i get is

Parser Error Message: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
Line 4:  
Line 5:  <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
Line 6:  <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Line 7:      Namespace="System.Web.UI" TagPrefix="asp" %>

Source File: /Site1.Master Line: 5

Assembly Load Trace: The following information can be helpful to determine why the assembly 'AjaxControlToolkit' could not be loaded.

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

+2  A: 

Generally, this means you are missing a reference to the Ajax Control Toolkit (dll or project, depending on how you do it) OR you have a reference but to the wrong version. (There is a version for .Net 2.0 and one for later versions. You need to know which version of the framework you're compiling to and then reference the appropriate version of the Ajax Control Toolkit.)

If you have changed your target framework since adding the reference to the toolkit, then you're most likely pointing to the wrong version of the toolkit.

Edit - added

Here's a link to the same question on another forum.

http://forums.asp.net/t/1055304.aspx?PageIndex=2

Another Edit

Also, Version=1.0.61025.0 is definitely the version meant for .Net 2.0. Your tag says .Net 3.5.

David Stratton
+2  A: 

You need to have the correct version of the AjaxControlToolkit DLL.

And, it needs to be in your app's bin folder (or the GAC).

Here's a quick explanation of how to set this up, setp by step.

DOK
A: 

How did you add the reference to the DLL? Is this a website or a web project?

Gabriel McAdams
a web project....
This usually means that your DLL is either not referenced, or that you referenced the wrong version. I would check to see that your project has a reference to the DLL (check under references to see that the DLL is listed (and that its the same version as the one listed in your master page)).If both of those seem right, try this - Highlight the DLL (under references) and in your properties window, change Copy Local to true. Does that make a difference?
Gabriel McAdams