ScriptManager, AjaxControlsToolkit and .NET Framework 3.5

 

This might save you some head hitting on the wall.

I'm working on a Web App using VS.NET 2005. I'm using ASP.NET AJAX and the AJAX Controls Toolkit in the application. I have a lot of javascript to write, so I decided to use VS.NET 2008 instead of VS.NET 2005 so I can make use of all the javascript intellisense candy that comes with it.

I open the solution in VS.NET 2008, it tells me that my Web App is configured to run on .NET 2.0 and asks me if I would like to update it to run on .NET 3.5. I said sure, no problem, click Next..Finish, and the conversion is complete. Build the solution, everything builds fine…great.

Ok so now its time to run the app, rightclick on the page and click View In Browser….the browser opens, and I get greeted with the following error message

 

The control with ID 'ValidatorCalloutExtender1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

 

(I'm using the ValidatorCalloutExtender control on this specific page).

Weird, that same page is working fine if I browse it using VS.NET 2005. So I think probably it's loading the wrong version of System.Web.Extensions assembly. I open the web.config file and confirm that the correct version (3.5) is being referenced…I removed the ScriptManager control from the page and readded it, still the same error. Did a bit of googling, got nothing.

After a lot of tries and attempts to try to figure out what was going wrong, the idea hit me….I might be using the wrong version of the Ajax Control Toolkit assembly…I checked the CodePlex site, and there it was, AjaxControlToolkit assembly for the .NET Framework 3.5. Downloaded and copied the assembly to the bin folder, every thing went back to normal…..

 

Its so easy to miss something like that, especially if you're upgrading from .NET 2.0 to .NET 3.5, where you expect everything to just "work".

Published Thursday, September 06, 2007 11:04 AM by wessamzeidan
Filed Under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: ScriptManager, AjaxControlsToolkit and .NET Framework 3.5 @ Friday, September 28, 2007 1:13 PM

Malek Salem

# Developer @ Wednesday, December 19, 2007 8:04 PM

Thank you for this tip.  I was searchng everywhere for a solution to this problem. I updated to the newer version of the Ajax Control Toolkit, everything works fine now.

Brendan

# re: ScriptManager, AjaxControlsToolkit and .NET Framework 3.5 @ Monday, April 14, 2008 6:07 AM

Wessam, today, you saved my day!
Thanx a lot for the golden tip!

Geert van Raaij

What do you think?

(required) 
required 
optional
required