pinky
pinky

Reputation: 193

Element 'UpdatePanel' is not a known element

I have one master page in project. I added scripmanager in that page. In one aspx page I added only update panel control because script manager is in master page.I open both file of master page and save. Still I am getting an error Element 'UpdatePanel' is not a known element.

Upvotes: 6

Views: 21858

Answers (8)

bgmCoder
bgmCoder

Reputation: 6370

Having the same problem, here is how I solved it:

With your ScriptManager, add it before your UpdatePanel, but close it's tag instead of putting the UpdatePanel and ContentTemplate inside of it.

<asp:ScriptManager ID="nonflashymanager" runat="server"/>
<asp:UpdatePanel id="nonflashyform" runat="server">
    <ContentTemplate>
    </ContentTemplate>
</UpdatePanel>

Upvotes: 0

APetersen786
APetersen786

Reputation: 41

Had the same problem when I changed from an older .Net to a later .Net 4 framework. Also changed to XHTML5. In XHTML5 the is not allowed which was used, which affected parsing, which caused the error/warning. Once I replaced with then it stopped the warnings.

Upvotes: 0

Michael Goldshmidt
Michael Goldshmidt

Reputation: 141

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

I was getting this error in VS 2015 due to reference to 3.5 in System.Web.Extensions page directive. Make sure it's 4.0

Upvotes: 0

Brissles
Brissles

Reputation: 3891

This is one way to resolve the 'Element 'UpdatePanel' is not a known element' error if you're using VS2008 or targetting earlier frameworks.

You need to explicitly include the following controls/namespaces in your web.config's pages section, contained within system.web.

<pages>
  <controls>
    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  </controls>
</pages>

Upvotes: 2

Pragnesh
Pragnesh

Reputation: 21

Put the following code in your web config. Just change assembly according to your Ajaxtoolkit

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

Upvotes: 2

Abhishek Shrivastava
Abhishek Shrivastava

Reputation: 749

I had similar issue and I figured that if we have UpdatePanel under "div" or "span" or even "asp:Content" the VS intellisense doesn't complain. Its strange though.

Upvotes: 7

Mesh
Mesh

Reputation: 6470

Found this here

Basically quit VS2010, delete the content of your 'Reflected Schema Cache', which should be in something like this:

C:\Users\[Your Username]\AppData\Roaming\Microsoft\VisualStudio\10.0\ReflectedSchemas

Restart VS and you should have fixed it.

Upvotes: 7

Rob
Rob

Reputation: 21

I was experiencing the same problem and also tried to drag and drop from the toolbox to no avail. I finally was able to solve it by adding the targetFramework="4.0" attribute to my compilation tag in my web.config file.

Upvotes: 2

Related Questions