Unrecognized tag prefix or device filter 'asp' in VS2012 Unrecognized tag prefix or device filter 'asp' in VS2012 asp.net asp.net

Unrecognized tag prefix or device filter 'asp' in VS2012


Closing and reopening the file (.aspx file not solution) from solution explorer worked for me in visual studio 2015. Before trying anything else you can give it a try.

enter image description here


Do you happen to have something like this in your Web.Config:

<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>

In that case, remove the entries for the asp tagPrefix (remove the entire section if no other tagPrefixes are left). This worked for me.


If you are having this "Unrecognised tag prefix 'asp' in VS2012" problem in a Content Page,

Check whether the Master page, under which you are adding the content page is missing the **<body>** or <form> Tag!

If it is missing this tag by any chance, then this <asp> tag is not recognized.