Thank you for recommending "Dev Pro provides comprehensive, independent how-to content on building applications with the Microsoft stack.".
Your recommendation has been successfully processed.
May 10, 2010 04:16 PM
Ambiguous BulletedLists and the AJAX Control Toolkit
Solving the problem of where that extra BulletedList control came from
Dev Pro
InstantDoc ID #125227
A funny thing happened to me the other day, on the way to an ASP.NET 4.0 application that uses server-side AJAX and controls from the latest version of the AJAX Control Toolkit. I was building a sample page to show off some of the controls when I got this exception:

The important part of the message was this:
The server tag 'asp:BulletedList' is ambiguous. Please modify the associated registration that is causing ambiguity and pick a new tag prefix.
Ambiguous? That's odd. Here is the highlighted source code, the @Register tag that Visual Studio added to the page for me the first time I added a Toolkit control:
Bizarre, and as I dug into the problem, it got even more bizarre. I realized that in the latest version of the toolkit, Microsoft added a default tag prefix of asp by adding this TagPrefix attribute to AssemblyInfo.cs for the Toolkit:

The last major release of the Toolkit that I found, the one released for ASP.NET 3.5 SP1, didn't have a prefix defined. As a result, it used the default cc1 prefix for a server control.
As a result of the change in the latest version of the Toolkit, the Toolkit controls now use by default the same tag prefix as regular ASP.NET server-side controls. This almost kind of sorta makes sense, now that Microsoft is putting more effort into the Toolkit and is fully supporting it.
But why the message that the ASP.NET BulletedList server control is ambiguous? I had only a single instance of the control on the page, so there was no chance of a naming collision. Besides, that would be a different problem.
Ambiguous? That could really only mean one thing: I had two assemblies referenced in the project that have BulletedList classes defined. But how could that be? This sample application used only Microsoft off-the-shelf parts at this point. Nevertheless, I set out to find the ambiguity. Thankfully, Microsoft makes the Toolkit source code available, so I was able to find the problem.