2016-04-08 220 views
0
<form id="form1" runat="server"> 
    <div> 
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><ajaxToolkit:ToolkitScriptManagerID="ToolkitScriptManager1"runat="server"> 
</ajaxToolkit:ToolkitScriptManager> 
    <asp:TextBox ID="TxtEditor" runat="server"/> 
     <ajaxToolkit:HtmlEditorExtender ID="HtmlEditorExtender1" runat="server" TargetControlID="TxtEditor">     
     </ajaxToolkit:HtmlEditorExtender> 
    <br/> 
    <asp:Button runat="server" Text="Submit" OnClick="Submit"/> 

</form> 

這是設計頁面和我添加「<%@註冊大會=」 AjaxControlToolkit」命名空間=‘AjaxControlToolkit’的TagPrefix = 「ASP」 %>」頁面類型或命名空間名稱HtmlEditorExtender'不存在命名空間存在「AjaxControlToolkit」

protected global::AjaxControlToolkit.HtmlEditorExtender HtmlEditorExtender1; 

我在這條線得到錯誤的頂部。

<?xml version="1.0" encoding="utf-8"?> 
    <configuration> 
    <configSections> 
    <sectionGroup name="system.web"> 
    <section name="sanitizer" requirePermission="false" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit" /> 
</sectionGroup> 
<section name="ajaxControlToolkit" type="AjaxControlToolkit.AjaxControlToolkitConfigSection, AjaxControlToolkit" /></configSections> 
<system.web> 

<compilation debug="true" targetFramework="4.5" /> 
<httpRuntime targetFramework="4.5" /> 
<compilation debug="true" targetFramework="4.0"> 
    <assemblies> 
    <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> 
    <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
    <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
    </assemblies> 
</compilation> 
<sanitizer defaultProvider="HtmlAgilityPackSanitizerProvider"> 
    <providers> 
    <add name="HtmlAgilityPackSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider"></add> 
    </providers> 
</sanitizer> 

    <pages> 
    <controls> 
    <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /> 
    </controls> 
</pages></system.web> 
<ajaxControlToolkit htmlSanitizer="AjaxControlToolkit.HtmlEditor.Sanitizer.DefaultHtmlSanitizer, AjaxControlToolkit.HtmlEditor.Sanitizer" /> 
<runtime> 
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
    <dependentAssembly> 
    <assemblyIdentity name="AjaxControlToolkit" publicKeyToken="28f01b0e84b6d53e" culture="neutral" /> 
    <bindingRedirect oldVersion="0.0.0.0-1.0.20229.24049" newVersion="1.0.20229.24049" /> 
    </dependentAssembly> 
</assemblyBinding> 
</runtime> 
</configuration> 

這是我的web.config頁

回答

1

您註冊 「ASP」 標記前綴 「AjaxControlToolkit」 命名空間,但進入HtmlEditorExtender與 「ajaxToolkit」 前綴。 無處不在將其更改爲「ajaxToolkit」。

相關問題