Add AJAX 3.5 extensions to 2.0 site

  • Thread starter Thread starter David C
  • Start date Start date
D

David C

I have an ASP.Net 2.0 application that I want to add AJAX functionality to.
I would like to use the Ajax Toolkit for 3.5 because there are some new
extended controls that I would like to employ. I tried changing the
web.config to refer to web.extensions version=3.5.0.0 but when I added a
ScriptManager to my page I get the error below. Can anyone point me to
where I can read how to accomplish this? Thanks.
-David

An unhandled exception occurred:

Message: c:\inetpub\wwwroot\Fileroom\frmMain.aspx(477): error BC30560:
'ScriptManager' is ambiguous in the namespace 'System.Web.UI'.

Stack Trace:

at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath
virtualPath)

at
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile)

at
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp,
Boolean allowBuildInPrecompile)

at
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath
virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)

at
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath
virtualPath, Type requiredBaseType, HttpContext context, Boolean
allowCrossApp, Boolean noAssert)

at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context,
String requestType, VirtualPath virtualPath, String physicalPath)

at
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext
context, String requestType, VirtualPath virtualPath, String physicalPath)

at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)

at
System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
 
You can't add the 3.5 extensions to a 2.0 web application. There are far too
many clashes with the 2.0 libraries, as you end up pulling along more than
just the AJAX stuff. If you try hard enough, you might kludge it together,
but then you end up with a site that is incredibly hard to maintain.

--
Gregory A. Beamer
MVP: MCP: +I, SE, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think Outside the Box! |
********************************************
 
So could I create a new web using VS 2008 and import all pages from the 2.0
web?
Also, can all versions be maintained in VS 2008 so I can go back and forth
between 3.5 extensions and 2.0 extensions? Or do I just need to install 3.5
extensions (toolkit) and then ignore the 3.5 controls in the 2.0 web?

I really want to be able to work on both environments from one development
tool. Thanks.

David
 
Yes, you should be able to pull all of your old site into Visual Studio 2008
and let it upgrade to 3.5 for you. The main thing it does is change the
web.config to support 3.5.

--
Gregory A. Beamer
MVP: MCP: +I, SE, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think Outside the Box! |
********************************************
 
Back
Top