Bob Avallone
Bob Avallone

Reputation: 979

Problem using Ajax with Visual Studio 2010

I am hoping someone can help me. I am trying to add Ajax controls to my VS 2010 project for the first time. I have previously gotten it to work when I used VS2008. I keep getting this exception:

Error 56 The type 'System.Web.UI.ExtenderControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Here’s what I did. I downloaded the ajax 4 toolkit and added a reference to the project. I also added a reference to system.web extension to my project. When I do this these lines get added to my web.config

<assemblies>
                <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies></compilation>

I added these lines to my aspx file.

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

And

<cc1:CalendarExtender runat="server" Id="txtDateOfBirth_CalendarExtender" TargetControlID="txtDateOfBirth"></cc1:CalendarExtender>

Etc. I also backed off and tried ajax 3.5, this didn’t help. I did notice that the ajax dll is 4.1 while the 'System.Web.Extensions is 4.0. I don’t know if this matters but I cannot find ajax 4.0 or 'System.Web.Extensions 4.1.

Thank once again in advance.

Upvotes: 0

Views: 1438

Answers (1)

Dima
Dima

Reputation: 707

This is not a solution but a recommendation: stay away from the Ajax toolkit or you are asking for trouble; use jquery instead (seriously, I have been down this road).

Upvotes: 1

Related Questions