Thursday, December 21, 2006

Element “ScriptManager” is not a known element. This can occur if there is a compilation error in the website

This entry has been moved, Please Click Here to View

39 comments:

Anonymous said...

Thanx...
Simple solution fixed my headache ;-)

Preet said...

This is simply great.i would have never thought about this solution.I guess i installed ,uninstalled various versions of Atlas ,but toolbox has to be refreshed manually it seems .

Anonymous said...

Thanks alot!!!! This was stressing me out very badly for a while!

Anonymous said...

This used to work for me, but no longer does for some reason. It doesn't even work in a brand new ajax-enabled web site.

hmmm...

Anonymous said...

The System.Web.UI.Controls is not a valid namespace is the error I get. The darn designer.cs keeps trying to add :
protected System.Web.UI.ScriptManager ScriptManager;

to the designer.cs and it throws that error. I was hoping the above would fix it, but it didnt, oh well.

Matthew Cosier said...

Have you tried adding the appropriate assembly as a reference in your project?

Also, the only reason it would be adding that is if you had declared a script manager in your markup - so if you don't want it there, remove it from your markup and let the designer sync up.

Chances are that you have added an assembly reference to the CTP of atlas, or perhaps asp.net ajax pre 1.0 RC, where the namespace was not System.*

Check the version of your referenced assembly - this could be it.

HTH,

Matthew Cosier

Jen said...

Hi I have a question about registering the assembly. I'm still a bit new to ASP.NET. I was getting the ... "is not a known element" message and I've since... installed VS 2005 service pack 1, flushed the intellisense, and tried your fix but I'm still seeing weird behavior. When I drag a ScriptManager control onto the page it also adds this "Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp"" I've tried adding the Microsoft ASP.NET 2.0 AJAX Extensions Toolbox Package as a Reference in my website but that didn't seem to fix the problem (even after a restart of VS). Any ideas what I'm missing? Thanks!

Anonymous said...

Thank you so much :)

Anonymous said...

Legend!! Thanks so much...was getting rather frustrated.

Anonymous said...

Men rulez, it runs, thanks for your solution

Anonymous said...

There's no need to Reset the toolbox. Just open your master and aspx pages in Design View will fix the problem.

Anonymous said...

Would encase ScriptManager like this work
<script>
<asp:ScriptManager runat="server">
</asp:ScriptManager>
</script>

Anonymous said...

Hi all, I was getting a
Error 42 Type 'System.Web.UI.ScriptManager' is not defined.

I tried everything, made sure everything was set up correctly, web.config was done right etc etc .. Fixed it in the end by simply right clicking on my project and choosing Add Reference. Then browsing to where the System.Web.Extensions.dll was and selecting that. It added the reference into the references folder and the error went away. Just mentioning it here in case anyone else has issues.

Anonymous said...

hi,

Solution was really nice but it does not solve my problem actually my page is in nested master page and from there i have applied ur solution but it still shows same problem.

Also after running the project whatever i do on page while parsing the page it gves error "Ambigous match found" however if i remove all ajax stuff from page then it works fine.

can u help regarding these?

Thanx.

Anonymous said...

Thanks, it worked.

thekaran.com

Anonymous said...

Didn't work so well for me, after doing this fix all my other pages had numerous errors with unknown controls. Heres how I fixed it:
In the controls tag of web.config

add tagPrefix="asp" namespace="System.Web.UI" ...etc...

add tagPrefix="asp" namespace="System.Web.UI.Controls"...etc...

add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit"

add tagPrefix="ajax" namespace="System.Web.UI"...etc...

add tagPrefix="ajax" namespace="System.Web.UI.Controls"...etc...

Then I changed the opening and closing tags for the offending scriptmangager to ajax:ScriptManager

Anonymous said...

Awesome! When I open my master page in design view, it fixes it. Thanks to whoever posted that.

Anonymous said...

Thanks Dude! Microsoft being Microsoft... always gives me a headache on stuff like this!

Anonymous said...

Superb!!! This fixed all the issues in my page..great men!!

Anonymous said...

I was getting same error, I tried to convert a project which had a master page. I tried to install on page and master page and did not fix problem.

I looked at the ajaxcontrol samples and noticed the scriptmanager tag did not have an ID.

So if I put asp:ScriptManager runat="Server" it works fine.

Anonymous said...

Thank you very much :)

Tom said...

Great post. The comment about ScriptManager having an ID when it shouldn't was the cause of my problem as well. Thanks to whoever posted that solution.

Dragging the control from the toolbox automatically puts in the ID, which confused me.

Anonymous said...

Thanks too!

Anonymous said...

Thank you very much!

Anonymous said...

Check the name of your master page.

Sometimes it may confuse with the master page name.

Do not use such name: "master.master"
Change to normal one, such as "BasicMasterPage.master"

Williamleo

Anonymous said...

Excellent solution!

Anonymous said...

Thanks u r information

Anonymous said...

Thank you very much, it worked.

Anonymous said...

Thanks for your solution of add reference of system.web.extension.

this work fine for me.

Gold Guide for World of Warcraft said...

good post :)

avsaotel said...

thankssssss adminnnnnnnnnnnnnnn niceeeeee sieeeeeeee
tekirdağ koltuk yıkama
tekirdağ halı yıkama
tekirdağ halı yıkama
tekirdağ halı yıkama
tekirdağ çilingir
okey sitesi açmak

tekirdağ halıyıkama
ankara halı yıkama
tekirdağ temizlik
ankara tel örgü
mankenler
cast
su pompası
ısı yalıtım
kilo vermek

dewa1111 said...

Thank you. Ankara Halı Yıkama

Murat said...

Thanks nice blog.
Ankara Halı Yıkama, Dikmen Halı Yıkama, Çankaya Halı Yıkama, Çayyolu Halı Yıkama, Batıkent Halı Yıkama, Eryaman Halı Yıkama, Ankara Koltuk Yıkama, Dikmen Koltuk Yıkama, Çankaya Koltuk Yıkama, Çayyolu Koltuk Yıkama, Batıkent Koltuk Yıkama, Eryaman Koltuk Yıkama, Ankara Halı Yıkama, Dikmen Halı Yıkama, Çankaya Halı Yıkama, Çayyolu Halı Yıkama, Batıkent Halı Yıkama, Eryaman Halı Yıkama, Ankara Koltuk Yıkama, Dikmen Koltuk Yıkama, Çankaya Koltuk Yıkama, Çayyolu Koltuk Yıkama, Batıkent Koltuk Yıkama, Eryaman Koltuk Yıkama, Ankara Halı Yıkama, Ankara Koltuk Yıkama, Halı Yıkama, Koltuk Yıkama, Çankaya Yıkama

Affordable Logo Design said...

Very interesting subject ,Appreciate it for sharing here with us .

vpills said...

nice...w

PSD To Wordpress said...

Excellent post. I want to thank you for this informative read. Keep up your great work.

CGI Flythrough said...

Thanks for sharing!

Village Talkies said...

Best Corporate Video Production Company in Bangalore and top Explainer Video Company, 3d, 2d Animation Video Makers in Chennai
Excellent article. Good tips! Fantastic stuff!

Thomas Armstrong said...

Top website designing company in India, Nashik provding world class website design and solutions.

best regards

Thomas

[url=https://www.intelvue.com/services/web-development/]Custom Web Development[/url] Provider