4
Answers

Getting error while usine 'AjaxControlToolkit'

anmol anmol

anmol anmol

14y
3.2k
1
HI,
     I am using 'TextBoxWatermarkExtender'.

     Here is my code :

    ----------------------------------------------------------------------------------------------

   <%@ 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>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:TextBox runat="server" id="txtText">
        </asp:TextBox>
        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1"
         runat="server" WatermarkText="Enter it..." TargetControlID="txtText">
         
        </asp:TextBoxWatermarkExtender>
    </div>
    </form>
</body>
</html>

----------------------------------------------------------------------

code compiles fine  but when i run the application, i get the following js error :
 
"AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll."

I have installed all necessary things, am i missing something ..... please help !!!

Answers (4)