[RESOLVED]Problem with BulletedList and AJAX Toolkit

The following code always comes out with the error:

"The server tag ‘asp:BulletedList’ is is ambiguous. Please modify the associated registration that is causing ambiguity and pick a new tag prefix". 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebRole1.WebForm2" %>


<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <div>
        <asp:BulletedList ID="BulletedList1" runat="server" />
    </div>
    

    </form>
</body>
</html>

Any suggestions?

Also, I’m using ASP 4.0, and the latest release of the AJAX toolkit…

The same problem happens in other versions of ASP.NET as well. The reason why you are getting the warning is that you have given the same "TagPrefix", asp, to AJAX toolkit controls. The "asp" TagPrefix is used for ASP.NET controls by default and I think
"BulletedList" is having conflict with the "BulletedListItem" control of AJAX toolkit control. Just give a different TagPrefix to the AJAX controls and that will solve your problem. The following line in your code needs to be modified.

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
 TagPrefix="asp" %>
//Modify the above to something like this.
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="ajx" %>

After you have changed the above TagPrefix change the “asp” prefixes before all the AJAX controls to “ajx” or whatever you have given in the TagPrefix property. 

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">  
    </asp:ToolkitScriptManager>  
//Change the above to something like this.
<ajx:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">  
    </ajx:ToolkitScriptManager>  

Hope this helps.

It worked, thanx a lot

 Thanks a lot – its work fine

correctly said..thnx a lot ..grt answer..it works…infact…

i was also suffering from the same problem ..then i used this suggestion…

Leave a Reply