locked
FCKEditor with A potentially dangerous Request.Form value was detected from the client RRS feed

  • Question

  • User2098176964 posted

    Hello!
    This problem I have I do not know how to explain.
    But the problem is as this, when I let FCKEditor be visible, I can not use my radio boxes to select different brochures where I can choose whether I want to keep the current file or I wish to remove or replace the current brochure.

    So I've added a Checkbox and let FCKEditor be in a updatepanel with trigger Postback to make hide/visible, but if I have the FCKEditor visible and make a selection in the radiobuttonlist then a exeption i thrown:

    Exception type: System.Web.HttpRequestValidationException
    Exception message: A potentially dangerous Request.Form value was detected from the client (ctl00$ctl00$ContentPlaceHolder1$MainContentArea$FCKeditor1

     I've lookt around to see if I can get at fix to this isue, the only thing that I notice is to set ValidateRequest="False" but that won't work either.

    Here is a snippet of the page

     Someone with a solution, my first tought was to use ajaxEditor but that don't containt dropdown styles to text with <H1> <H2> and so on.

    Thanks

        <asp:Panel ID="pnEditCarsOuter" runat="server" CssClass="pnModalDetail" Width="1024px" Height="700px" Style="display: none;">
            <asp:UpdatePanel ID="upEditCars" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Button ID="btnShowPopup" runat="server" Style="display: none" />
                    <cc1:ModalPopupExtender ID="mdShow" runat="server" TargetControlID="btnShowPopup"
                        PopupControlID="pnEditCarsOuter" CancelControlID="btnClose" BackgroundCssClass="modalBackground">
                    </cc1:ModalPopupExtender>
                    <div class="ModalPopUpTop">
                        <asp:LinkButton ID="btnClose" runat="server" CssClass="ModalPopUpClose" CausesValidation="false"
                            ToolTip="Stäng" /></div>
    
    <asp:CheckBox ID="chbAddLittleArticle" runat="server" AutoPostBack="true" Text="Mark to show or hide" />
                                    <asp:UpdatePanel ID="upFckEditor" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
                                        <ContentTemplate>
                                            <FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" FormatOutput="true" FormatSource="true"
                                                Height="500px" Width="620px" UseBROnCarriageReturn="true">
                                            </FCKeditorV2:FCKeditor>
                                        </ContentTemplate>
                                        <Triggers>
                                            <asp:PostBackTrigger ControlID="chbAddLittleArticle" />
                                        </Triggers>
                                    </asp:UpdatePanel>
    
      <asp:RadioButtonList ID="rbEditBroschyr1" runat="server" AutoPostBack="true" RepeatDirection="Horizontal">
                                            <asp:ListItem Value="2">Pdf broschur</asp:ListItem>
                                        <asp:ListItem Value="3">No broschure</asp:ListItem>
                                        <asp:ListItem Selected="True" Value="-1">Keep broschure</asp:ListItem>
                                    </asp:RadioButtonList>
    
     <asp:UpdatePanel ID="upEditBroschyr1" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <asp:Panel ID="pnEditNetpublicator" runat="server">
                                            <div class="BlockItem">
                                                <asp:Label ID="lblEditNetPub" runat="server" CssClass="blockLabel" Text="Skriv in publikations id:" />
                                                <asp:TextBox ID="txtEditNetpubID" runat="server" MaxLength="9" />
                                            </div>
                                        </asp:Panel>
                                        <asp:Panel ID="pnEditPdfBroschyr" runat="server">
                                            <div class="BlockItem">
                                                <asp:Label ID="lblPdfUpload1" runat="server" CssClass="blockLabel" Text="Välj en *.pdf fil:" />
                                                <asp:FileUpload ID="FileUpload1" runat="server" />
                                                <asp:RegularExpressionValidator runat="server" ID="revFileUpload1" ErrorMessage="Du måste välja en *.pdf"
                                                    Text="*" ControlToValidate="FileUpload1" CssClass="ErrorIndicator" ValidationExpression="(.*?)\.(pdf)$"
                                                    ValidationGroup="EditCar" />
                                            </div>
                                        </asp:Panel>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="rbEditBroschyr1" EventName="SelectedIndexChanged" />
                                        <asp:PostBackTrigger ControlID="btn_Edit" />
                                    </Triggers>
                                </asp:UpdatePanel>
                            </asp:Panel>
    
        </ContentTemplate>
            </asp:UpdatePanel>
        </asp:Panel>
    Monday, February 28, 2011 3:26 AM

All replies

  • User-1971614856 posted

    Use ValidateRequest="false" in page directive (top most line of HTML view of aspx page)

    Monday, February 28, 2011 3:51 AM
  • User2098176964 posted

    Hi!

    As I wrote in my post I've already tried that

    " I've lookt around to see if I can get at fix to this isue, the only thing that I notice is to set ValidateRequest="False" but that won't work either"

    Thanks for your suggestion

    Monday, February 28, 2011 3:56 AM
  • User2098176964 posted

    Hi!

    What is happeing when I use framework 4.0.

    I've replaced FCKEditor to get around the problem above but now the Ajax HTMLEditor is not rendering the toolbar, all images is paragraph charaters.

    Whata hell is going on.

    Anyone?

    Monday, February 28, 2011 7:30 AM