locked
Unable to use controls of Ajax Control toolkit RRS feed

  • Question

  • User-1376628959 posted

    Hello

    I have followed the steps as per the following link but I am still not getting the Ajax controls on the page.

    The link is : http://www.asp.net/web-forms/tutorials/ajax-control-toolkit/getting-started/using-ajax-control-toolkit-controls-and-control-extenders-cs

    The aspx code is as follows

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

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

    <%@ 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:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:TextBox ID="TextBox1" Columns="80" Rows="10" TextMode="MultiLine" runat="server"></asp:TextBox>
    <asp:HtmlEditorExtender ID="HtmlEditorExtender1" TargetControlID="TextBox1" EnableSanitization="false"
    runat="server">
    </asp:HtmlEditorExtender>

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

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

    Please help me out with it.

    Wednesday, May 14, 2014 12:58 AM

Answers

  • User2103319870 posted

    try changing the scriptManager from Asp:ScriptManager to ToolkitScriptManager which is a part of AjaxControlToolkit controls

    <asp:ScriptManager id="ScriptManager1" runat="server"></asp:ScriptManager>

    then please change to to ToolkitscriptManager

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                    </asp:ToolkitScriptManager>

    Complete Code

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                    </asp:ToolkitScriptManager>
                    <asp:TextBox runat="server" ID="txtBox1" TextMode="MultiLine" Columns="50" Rows="10"
                        Text="Hello <b>world!</b>" />
                    <asp:HtmlEditorExtender ID="htmlEditorExtender1" TargetControlID="txtBox1" 
                        runat="server" EnableSanitization="False">
                        <Toolbar>
                            <asp:Bold />
                            <asp:Copy />
                        </Toolbar>
                    </asp:HtmlEditorExtender>
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 14, 2014 1:48 AM
  • User1326971216 posted

    Use 

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePageMethods="true"></asp:ToolkitScriptManager>

    Ajax Control

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 14, 2014 2:46 AM

All replies

  • User177399542 posted

    What error you are getting?

    Try adding Ajax Control Toolkit by Nuget package.

    http://www.codingfusion.com/Post/3-Different-ways-to-add-AjaxControlToolkit-in-Asp

    Wednesday, May 14, 2014 1:42 AM
  • User2103319870 posted

    try changing the scriptManager from Asp:ScriptManager to ToolkitScriptManager which is a part of AjaxControlToolkit controls

    <asp:ScriptManager id="ScriptManager1" runat="server"></asp:ScriptManager>

    then please change to to ToolkitscriptManager

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                    </asp:ToolkitScriptManager>

    Complete Code

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                    </asp:ToolkitScriptManager>
                    <asp:TextBox runat="server" ID="txtBox1" TextMode="MultiLine" Columns="50" Rows="10"
                        Text="Hello <b>world!</b>" />
                    <asp:HtmlEditorExtender ID="htmlEditorExtender1" TargetControlID="txtBox1" 
                        runat="server" EnableSanitization="False">
                        <Toolbar>
                            <asp:Bold />
                            <asp:Copy />
                        </Toolbar>
                    </asp:HtmlEditorExtender>
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 14, 2014 1:48 AM
  • User1326971216 posted

    Use 

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePageMethods="true"></asp:ToolkitScriptManager>

    Ajax Control

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 14, 2014 2:46 AM
  • User-1376628959 posted

    Thanks a lot

    It worked.

    Wednesday, May 14, 2014 1:09 PM