Uploader together with CKEditor both in updatepanel

  •  08-10-2011, 3:18 AM

    Uploader together with CKEditor both in updatepanel

    Hi,
     
    I have CKEditor in an updatepanel containing text: <h1>hello</h1>
    In another updatepanel I have your Ajax Uploader.
     
    When uploading a file I get the error:
    A potentially dangerous Request.Form value was detected from the client (CKEditorEdit="<h1>hello</h1>")
     
    Because both controls are in their own update panels, this should never happen. The contents of CKEditor should not be submitted. What can I do to solve this?
     
    This is the code I am using:
     
    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="test.aspx.vb" Inherits="EasyOrganizer.test" %>
    <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>
     
    <!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">
        <div>
                 <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
     
                 <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
                        <ContentTemplate>
                               <CKEditor:CKEditorControl ID="CKEditorEdit" Height="300px" Toolbar="Full" ToolbarCanCollapse="false" HtmlEncodeOutput="true" runat="server">
                               </CKEditor:CKEditorControl>
                        </ContentTemplate>
                 </asp:UpdatePanel>
     
                 <asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server">
                        <ContentTemplate>
                               <asp:Button ID="BtnUpload" Text="Toevoegen" ToolTip="Afbeeldingen toevoegen" runat="server" />
     
                               <CuteWebUI:Uploader ID="Uploader" runat="server"
                                      InsertButtonID="BtnUpload" InsertButtonStyle-CssClass="button"
                                      AutoUseSystemTempFolder="false" UploadType="Silverlight" ProgressLabelStyle-BackColor="White"
                                      ManualStartUpload="false"
                                      NumFilesShowCancelAll="10000" ShowProgressBar="false" ShowProgressInfo="false"
                                      MultipleFilesUpload="true" 
                                      ProgressTextTemplate="Voortgang: %P%. Resterende tijd: %T% seconden.">
         
                                      <ValidateOption AllowedFileExtensions="bmp,tif,gif,jpg,jpeg,png" />
                               </CuteWebUI:Uploader>
                        </ContentTemplate>
                 </asp:UpdatePanel>
        </div>
        </form>
    </body>
    </html>
     
    CODE BEHIND:
     
    Public Class test
           Inherits System.Web.UI.Page
     
           Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
                 If Not IsPostBack Then
                        Me.CKEditorEdit.Text = "<h1>hello</h1>"
                 End If
           End Sub
     
    End Class
     
     
View Complete Thread