I am using ajaxcontrols and in that all controls are working well But I had not found any of the control named as HtmlEditorExtender so I had just copied this tag in .html page
<%@ Register TagPrefix="ajaxToolkit" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit"%> <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="Server" /> <ajaxToolkit:HtmlEditorExtender TargetControlID="txtComments" runat="server" /> <asp:TextBox ID="txtComments" runat="server"></asp:TextBox>
here is working fine but the problem arises on , then i downloaded Nuget.tool on reading some of the problems facing just like me but still its not working
what shall I do?
My Web.config file is
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<pages>
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
<sanitizer defaultProvider="AntiXssSanitizerProvider">
<providers>
<add name="AntiXssSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider" />
</providers>
</sanitizer>
</pages>
</system.web>
</configuration>
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
add <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="Server" />
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="HTMLEditor" %>
add folowing tag in your web.config
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<pages>
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>
and in page
<ajaxToolkit:HtmlEditorExtender ID="replyBody_HtmlEditorExtender" runat="server" Enabled="True" OnImageUploadComplete="saveFile" ClientIDMode="AutoID" EnableSanitization="true" TargetControlID="replyBody">
Method 2
Try using ScriptManager instead of ToolkitScriptManager.
In my project, i’m also working with Editor control (ajax toolkit control) instead of HtmlEditorExtender. A Editor control do the same as the HtmlEditorExtender and you can have three panels Design Mode, HTML Mode and Preview Mode.
If you want to use Editor control instead just add the following register:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="asp" %>
Hope it helps.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0