Subscribe

How to solve unknown server tag 'asp:ListView'

Recently I got this error message, basically telling me I was using an unknown server control. In this case, the ListView control. First thing that comes to mind is if the control itself exists in .NET 3.5, which I was using. Of course it does!

Next thing, I was reading about the solution to this being to completely reinstall .NET Framework 3.5 and .NET Framework 3.5 SP1.

However, I solved it by adding two lines to the Web.Config controls element instead, saving me a lot of time.

Here's the code:

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

Comments

Thanks for your help!
It was very useful!

This worked for me in Sharepoint 2007. How bizarre that you would have to reference asp web controls like this in the web.config.

Thanks

Thanks....it's works :)

Write a comment





Or use Twitter to identify


To the top