Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Problem when upload image to insert using HTML editor extender

$
0
0

Hi,

i have a problem with HTML editor extender. When i upload image to insert using HTML editor extender, this error messages appear:

Unhandled exception at line 4271, column 10 in http://localhost:64438/ScriptResource.axd?d=yeSNAJTOPtPimTGCAo3LlVYSwQFFPkQzkn31D_SXQKoWnN8zdgeOyyHSgI1pOaaiVC9ge3csuOOTlhzJq8DmlJMYoxIFGSKSs6sL1e-481stzh350iA6Tc9-k2xv32rd0&t=ffffffffda74082d

 

0x800a139e - JavaScript runtime error: Sys.ArgumentException: Cannot deserialize. The data does not correspond to valid JSON.

Parameter name: data

This is my source:

 <asp:UpdatePanel ID="updatePanel1" runat="server">

                                        <ContentTemplate>

 

                                  

                                  

                                         <asp:TextBox ID="TB_editor_news" runat="server" Width="700px" Height="400px"></asp:TextBox>

                                            <asp:HtmlEditorExtender ID="TB_editor_news_HtmlEditorExtender" runat="server" Enabled="True" TargetControlID="TB_editor_news" EnableSanitization="false" OnImageUploadComplete="TB_editor_news_HtmlEditorExtender_ImageUploadComplete" DisplaySourceTab="true">

                                                <Toolbar>

                                                     <asp:BackgroundColorSelector />

                                            <asp:Bold />

                                            <asp:Copy />

                                            <asp:CreateLink />

                                            <asp:Cut />

                                            <asp:Delete />

                                            <asp:FontNameSelector />

                                            <asp:FontSizeSelector />

                                            <asp:ForeColorSelector />

                                            <asp:HorizontalSeparator />

                                            <asp:Indent />

                                            <asp:InsertHorizontalRule />

                                            <asp:InsertOrderedList />

                                            <asp:InsertUnorderedList />

                                            <asp:Italic />

                                            <asp:JustifyCenter />

                                            <asp:JustifyFull />

                                            <asp:JustifyLeft />

                                            <asp:JustifyRight />

                                            <asp:Outdent />

                                            <asp:Paste />

                                            <asp:Redo />

                                            <asp:RemoveFormat />

                                            <asp:SelectAll />

                                            <asp:StrikeThrough />

                                            <asp:Subscript />

                                            <asp:Superscript />

                                            <asp:Underline />

                                            <asp:Undo />

                                            <asp:UnLink />

                                            <asp:UnSelect />

                                            <asp:InsertImage />

                                                </Toolbar>

                                            </asp:HtmlEditorExtender>

                                            </ContentTemplate>

                                    </asp:UpdatePanel>

This is my code behind :

   protected void TB_editor_news_HtmlEditorExtender_ImageUploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)

        {

           // updatePanel1.Visible = true;

            string url = "~/Images/" + e.FileName;

            AjaxControlToolkit.AjaxFileUpload FU1 = (AjaxControlToolkit.AjaxFileUpload)sender;

            FU1.SaveAs(Server.MapPath(url));

            e.PostedUrl = Page.ResolveUrl(url);

I can upload anything images with this error. Please , help me fix it or show me how to fix it.
Please, comment soon as you can. The deadline is so close.

Note : i tried in project on my PC, everything is OK. But when i move i to web server and publish it , it's not OK


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>