C# .NET - Unknown server tag 'asp:TextBoxWatermarkExtender'.

Asked By Daniel on 14-Oct-11 04:04 PM
Hi!Can someone help please!I am getting the following error:<<Unknown server tag 'asp:TextBoxWatermarkExtender'.>>
I am using the following code:
 Enter Code number:</td>
        <td>
            <asp:TextBox ID="txtFindWantedPerson" runat="server" TextMode="Password"></asp:TextBox>
            <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" 
        TargetControlID="txtFindWantedPerson" WatermarkText="Type First Name Here" 
        WatermarkCssClass="watermarked" />
        </td>
Peter Bromberg replied to Daniel on 14-Oct-11 07:20 PM
You are missing a reference to the AjaxControlToolkit assembly:
<pages>      
<controls>        
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajt"/>
</controls>
</pages>
Don't use asp for the tagPrefix as that collides with the default asp: tagPrefix for regular controls.
aneesa replied to Daniel on 14-Oct-11 11:49 PM
Please add the following on the top of ur markup, above content tag

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
Suchit shah replied to Daniel on 15-Oct-11 02:03 AM
  • Add <%@ Register Assembly=”AjaxControlToolkit” Namespace=”AjaxControlToolkit” TagPrefix=”ajaxToolkit”%>  at the top of the page
  • Check that AjaxControlToolkit.dll, AjaxControlToolkit.pdb, and AjaxExtensionsToolbox.dll are all found in the Bin directory
  • In web.config under system.web > compilation > assemblies, check that you have the following assemblies:
    • <

      • add assembly=System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35/>

      • <

        • add assembly=System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35/>

      • In web.config under system.web > pages > controls, check that you have the following key added:
        • <

          • add namespace=AjaxControlToolkit assembly=AjaxControlToolkit tagPrefix=ajaxToolkit/>
          dipa ahuja replied to Daniel on 15-Oct-11 03:40 AM
          Untitled document
          Make sure you have added the dll and the ajax registration in Bin directory and the web.config file :
           
          1. Add the ajaxtoolkit.dll in the BIN directory of your website
           
          2. Add  this in the web.config inside Controls node:
          <controls>
          <add tagPrefix="cc1" namespace="System.Web.UI"
          assembly="System.Web.Extensions, Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/>
          <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="cc1"/>
          </controls>