我想启用我的RadEditor上传按钮。目前它已被禁用,您可以在屏幕上看到。我想启用它。我做了很多定制。请纠正我错在哪里。任何帮助非常感谢。我期待着有一个答案。我还允许“Everyone”允许我的img文件夹,它位于我的ascx文件的外面。另一个重要的事情是,我在编辑模式下根本没有获取上传按钮,而我在添加时在禁用模式下获取上传按钮。这对我来说很奇怪。
[RadEditor_ImageManager_Uploadbutton][1]
[1]: http://i.stack.imgur.com/GzjCt.png
Here is the code I have written, in ascx file.
=======
<telerik:radeditor runat="server" id="tbcontent" AllowScripts="True" content='<%#Bind("content") %>' DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd" class="HtmlEditor"><ImageManager UploadPaths="~/img" DeletePaths="~/img" ViewPaths="~/img" MaxUploadFileSize="10240000" SearchPatterns="*.gif, *.jpg, *.jpe, *.jpeg, *.tiff, *.tif,*.bmp"/></telerik:radeditor>
======
There is a code in my web.config file.
=======
<location path="admin/Telerik.Web.UI.DialogHandler.aspx">
<system.web>
<authorization>
<allow roles="TestUser"/>
<allow users="?"/>
</authorization>
</system.web>
</location>
<location path="admin/Telerik.Web.UI.SpellCheckHandler.axd">
<system.web>
<authorization>
<allow roles="TestUser"/>
<allow users="?"/>
</authorization>
</system.web>
</location>
-----
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<remove name="ScriptModule" />
<remove name="UrlRoutingModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral />
<add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" preCondition="managedHandler"/>
</modules>
----
<handlers>
<add name="ChartImage.axd_*" path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, preCondition="integratedMode"/>
<add name="Telerik.Web.UI.SpellCheckHandler.axd_*" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, preCondition="integratedMode"/>
<add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler"/>
<add name="Telerik.Web.UI.DialogHandler" path="Telerik.Web.UI.DialogHandler.axd" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, preCondition="integratedMode" />
<add name="Telerik.RadUploadProgressHandler.ashx" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode"/>
<add name="Telerik.Web.UI.WebResource.axd" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode"/>
</handlers>
------
<httpHandlers>
<add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI"/>
<add verb="*" path="Telerik.Web.UI.DialogHandler.axd" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, validate="false"></add>
<add verb="*" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, ></add>
<add verb="*" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, validate="false"/>
<add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false"/>
<add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/>
</httpHandlers>
-----
======
Anybody tell me what's wrong with this, Why Upload button is disabled?
Appreciate your help as early as possible.
Thanks,
Harshal
答案 0 :(得分:0)
确保使用AsyncUpload:
<telerik:RadEditor ID="RadEditor1" runat="server">
<ImageManager EnableAsyncUpload="true" />
</telerik:RadEditor>
允许所有处理程序的所有人访问,例如:
<location path="Telerik.Web.UI.WebResource.axd">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
从该文章中复制web.config的处理程序列表,因为您的文件不使用正确的完全限定程序集名称,也不使用非限定程序集名称。