asp:XXXXX is not a known element. This can occur if there is a compilation error in the web site.

When working with the RC version of the ASP.NET AJAX Library, I was getting this error with the updatepanel controls and the scriptmanager control.  I followed the Microsoft documentation and renamed everything to the asp prefix, that belonged to the ajax library.  However, I kept getting these errors after I upgraded from beta 2 to RC.  So what was the problem?

After digging around for a while, I found out on an ASP.NET forums post that the asp prefix is the problem.  After changing it to ajax, it works fine.  Note that you can have multiple controls use the same prefix (as long as there isn't a name resolution problem), but you can't use the 'asp' prefix.  I understand that the microsoft team is getting users ready for when the AJAX library is part of the .NET framework (in the future); however, that was a horrible problem, as it affected how my code got rendered and messed with the designer.

Published Monday, January 08, 2007 12:18 PM by bmains
Filed under: ,

Comments

# re: asp:XXXXX is not a known element. This can occur if there is a compilation error in the web site.

Thursday, October 04, 2007 9:47 PM by Lydon

Excellent dude, thanks for the tip!  Works like a champ.

# re: asp:XXXXX is not a known element. This can occur if there is a compilation error in the web site.

Thursday, October 25, 2007 9:42 AM by Anton Maters

I got this error only on pages using a masterpage.

I tried everything.... but this :)

Thank you so much!

# re: asp:XXXXX is not a known element. This can occur if there is a compilation error in the web site.

Tuesday, October 30, 2007 11:23 AM by Jesse

Thanks, why is it the default then...

To anyone who is confused by this as I was for a second, you can change the prefix by going to this line in your web.config

<pages>

<controls>

<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</controls>

</pages>

change tagPrefix="asp" to tagPrefix="ajax" or whatever prefix you want. Then change your existing ajax control tags to use that prefix instead. E.g. <asp:UpdatePanel...> becomes <ajax:UpdatePanel...>

# re: asp:XXXXX is not a known element. This can occur if there is a compilation error in the web site.

Sunday, November 11, 2007 8:34 AM by iemrbukv

TEAM BAZZA <a href=bavaria.jrurborchieabbv.com.cn/>bavaria 39 cruiser</a>  AURELIO CANDIAN <a href=abbe.nxiharboremidifiley.cn/>abbellire space</a>  AUTOMATISMO PERSIANA UMBRIA <a href=leggere.vrsthotelabbs.com.cn/>leggere la bussola</a>  SCLEROSI LATERALE AMIOTROFICA NON EREDITARIA <a href=gioch.cykjstrettissimea.cn/>giochi carta magic adunanza download</a>  

ESUBERANZA <a href=tras.vnswabbellirenm.cn/>trasporto per anziani</a>  BAGGIANATA <a href=aggi.xdctorchestrag.com.cn/.../a>  HOTEL ANFORA <a href=tristez.ergdabitudinebocellu.net.cn/.../a>  NORME ARMONIZZATA <a href=definir.wjjscasavacanzabarz.cn/.../a>  

SCOLORANO <a href=ambasci.hhwzaumentosenf.cn/>ambasciata cubana</a>  ASSEGNAZIONI PROVVISORIE SALERNO <a href=volvoc70.zmcbtabellaallenamm.org.cn/>volvo c70 cabriolet</a> SETTIMANA BIANCHE ALTO ADIGE VACANZA <a href=alcolismo.zmcbtabellaallenamm.org.cn/>alcolismo e guida</a>  ORDINE AVVOCATO COMO <a href=codomini.pghaattilioscarb.net.cn/.../a>  

AMARO CASO BARONESSA CARINI COPERTINA <a href=insalato.craocavolateu.cn/>insalatona ananas</a>  BANCAROTTA FRAUDOLENTA <a href=cerettac.qplbrichiestaaumeh.net.cn/>ceretta caldo</a>  JOHNNI BE GOODE <a href=crimin.tyajtassoalcolicoa.org.cn/.../a>  ABBREVIAZIONE ACRONIMO <a href=piscina.bihydrinkalcod.com.cn/>piscina val badia</a>  AFFUSOLANTE <a href=sosp.txqvabbelliretam.com.cn/.../a>  BIGLIETTO AUGURIO DIDDL <a href=jerodc.gllxablazionecaz.org.cn/>jerod camaleonte</a>  CANNA SHIMANO SPINNING <a href=diama.fchxamrattilat.org.cn/>diamante brillante anello</a>  AMPLIFICATORI PER MICROFONO <a href=pellet.odqfaumentoglanz.net.cn/>pellet ardere emilia romagna</a>  SANDALO OCCHIO BUE <a href=biscotti.ukomcamorracaivl.net.cn/>biscottino granulato</a>

# re: asp:XXXXX is not a known element. This can occur if there is a compilation error in the web site.

Wednesday, November 21, 2007 5:15 AM by sachien

Thanx dude

# re: asp:XXXXX is not a known element. This can occur if there is a compilation error in the web site.

Thursday, January 17, 2008 9:45 AM by RK

Works like champ, Thanks a lot. Please don't forget to update your script manager prefix as:

<ajax:ScriptManager id="scriptmanager1" runat="server">    </ajax:ScriptManager>

# re: asp:XXXXX is not a known element. This can occur if there is a compilation error in the web site.

Wednesday, January 30, 2008 5:03 PM by ATJaguarX

Just what the doctor ordered.  Thanks for spelling it out for me Jesse!

# re: asp:XXXXX is not a known element. This can occur if there is a compilation error in the web site.

Thursday, January 31, 2008 12:11 AM by Bivin

This what i call it SMART

# re: asp:XXXXX is not a known element. This can occur if there is a compilation error in the web site.

Wednesday, February 27, 2008 3:01 AM by RoseAngel

Thanks a lot!!!

very useful.