Using Older AJAX Controls in Visual Studio 2008

I've been testing the DotNetSlackers' AJAX Data Controls for a little bit and they're definately cool. I ran into an issue, however, when trying to build an app with one of the controls in Visual Studio 2008 (.NET Framework 3.5). The assembly was compiled against version 1 of the AJAX Library. I continually received an error message stating "The control with ID 'TestGrid' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it." However, it did have a ScriptManager before the TestGrid control. I bounced it off the Microsoft ASP.NET team and, like always, they provided me with an answer. Mike Harder said that if the assembly was compiled against the earlier version, I needed to redirect the binding at runtime using this:

           <runtime>
  <
assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <
dependentAssembly>
      <
assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
      <
bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
    </dependentAssembly>
    <
dependentAssembly>      <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
      <
bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
    </dependentAssembly>
  </
assemblyBinding>
</
runtime>

This new section in the web.config is provided by default on all new 3.5 projects in Visual Studio 2008. Thanks Mike for your help!

By the way, the DotNetSlackers FREE AJAX Data Controls can be downloaded at http://dotnetslackers.com/projects/AjaxDataControls/. They're also holding a contest each month to give away free swag. The details can be found at http://dotnetslackers.com/contest/peers/.

Published Tuesday, November 06, 2007 3:47 PM by Jason N. Gaylord

Comments

# re: Using Older AJAX Controls in Visual Studio 2008

Tuesday, November 06, 2007 4:16 PM by kazimanzurrashid

Thanks Jason for mentioning it. We will definitely include the VS2008 version from now on.

# re: Using Older AJAX Controls in Visual Studio 2008

Monday, November 12, 2007 2:05 PM by Albert

Thnx man! Works like a charm!

# re: Using Older AJAX Controls in Visual Studio 2008

Thursday, November 22, 2007 9:58 AM by Lee Timmins

Hi you are my hero.  I have just spent all day on this.

# oldversion com

Wednesday, April 30, 2008 6:34 AM by oldversion com

Pingback from  oldversion com

# oldversion com

Wednesday, May 14, 2008 10:47 AM by oldversion com

Pingback from  oldversion com

# re: Using Older AJAX Controls in Visual Studio 2008

Tuesday, May 27, 2008 11:48 PM by Eric

OMG that worked!!!!  THANK YOU!!!!!!!!

For reference this was the error I received because of an AJAX versioning conflict.  Error is now resolved.

Error 1 The type 'System.Web.UI.ScriptManager' exists in both

'c:\WINDOWS\ASSEMBLY\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' and

'c:\WINDOWS\ASSEMBLY\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll'

Also, this statment "This new section in the web.config is provided by default on all new 3.5 projects in Visual Studio 2008." is not correct.  I have VS2008 and this section was not there...fyi.  Thanks.

# re: Using Older AJAX Controls in Visual Studio 2008

Friday, August 08, 2008 11:59 AM by Scott Marlowe

Works like a charm. Thanks!

Leave a Comment

(required) 
(required) 
(optional)
(required)