Thank you for visiting!

Please consider subscribing to the RSS feed or following me on Twitter.

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:

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


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's works :)

Thanks man, it helped a lot

Thanks a lot...... it works :-)

That worked. Thanks buddy

I already have those lines in my webconfig file and yet I still get the error. :/ I only got the error when I created a new project and brought all of my files in from an existing project. It worked fine on my last project.

OK I figured it out. I added the webconfig file to the project but left it in the other projects folder. I assumed if I added it then it would move automagically. But there was a little arrow on the file icon within the project. So I figured that probably meant it was a redirect so to speak. So I physically moved the file and it works. Thanks.

To the top