Sharepoint 2010

SharePoint

Tag Archives: Visual Web parts

Unknown server tag ‘asp:ListView’ error with SharePoint 2010

Problem Statement

I had created a SharePoint 2010 Web Part which was using the ASP.NET List view. The code compiled fine and was deployed properly. However, when I was trying to add the web part to the Web part page, I was getting the following error:

Unknown server tag ‘asp:ListView’

Resolution

Open the web.config and add the following entry in <Controls>

<controls>
       <add tagPrefix=”asp” namespace=”System.Web.UI.WebControls” assembly=”System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″/>
  </controls>

Advertisements