Element ScriptManager is not a known element

J

John Kotuby

Hi all,

Just in case anyone gets this error and can't find the solution to their
problem by Googling it, here is what I discovered in my Web Project. I have
a rather large project that was started with VS2003 which I continually add
to and update. Very often if I need a new User Control that resembles an
existing one I will make a copy of it and then modify. Maybe that's a bad
practice...maybe not.

Anyway, I was getting "warning" errors in VS2008 (with the latest service
packs for it and .NET 3.5) that <asp:ScriptManager> is not a known element.
I searched the web and scoured my web.config. What I finally discovered was
that there were old references to System.Web.Extensions at the top of some
pages, like the one below.

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

By removing those @Register entries from the page the warnings disappeared
and intellisense began showing me the ScriptManager as being available. Of
course I already had a reference to that Asssembly in my web.config, and
that is probably why my project compiled.
 
C

Cowboy \(Gregory A. Beamer\)

Here is my take on what you are seeing:

You started your app with the AJAX controls prior to Visual Studio 2008,
which you downloaded from www.asp.net. You then updated the website at some
time for AJAX that ships with VS 2008. When the site was built, the
registering of System.Web.Extensions was not placed in the web.config, so it
was registered on each page that used AJAX controls. But, when you updated
to .NET 3.5 in VS 2008, it added the line to the web.config file.

This is a common issue for sites that were started with the download AJAX
extensions for .NET 2.0. The conflict comes from this line in the web.config
(under <assemblies>):

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top