PDA

View Full Version : 'ListView' is ambiguous


wisemx
01-17-2008, 01:54 AM
Note: We need a .NET 3.5 section. http://community.discountasp.net/emoticons/wink.gif

Hannes Preishuber posted something interesting today worth noting on our local systems:



http://weblogs.asp.net/hpreishuber/archive/2008/01/17/listview-is-ambiguous-in-the-namespace-system-web-ui-webcontrols.aspx said...

'ListView' is ambiguous in the namespace 'System.Web.UI.WebControls'.



When you have Visual Studio 2008 and ASP.NET 3.5 Extensions installed you may run in following error.


BC30560: 'ListView' is ambiguous in the namespace 'System.Web.UI.WebControls'.



In my case, this happens when i drag an drop a Listview Control from toolbar. Then Visual Studio adds following line in web.config


<add assembly="System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies>


Remove it - and it should work again.


In a second case, same action, added following in ASPX page


<%@ Register assembly="System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.WebControls" tagprefix="asp" %>


Remove it also


seems to be a bug from 3.5 extensions.

mjp
01-17-2008, 06:51 AM
wisemx said...
Note: We need a .NET 3.5 section. http://community.discountasp.net/emoticons/wink.gif


You're in it! ;)

mjp
---
DiscountASP.NET

wisemx
01-17-2008, 07:01 AM
woot http://community.discountasp.net/emoticons/hop.gif