This is a migrated thread and some comments may be shown as answers.

content not displaying after saving using rad editor asp.net ajax in mozilla

5 Answers 199 Views
Editor
This is a migrated thread and some comments may be shown as answers.
anju
Top achievements
Rank 1
anju asked on 22 Dec 2008, 06:37 AM
hai,

I have a problem with rad editor for asp.net ajax when viewing in mozilla..
I am  using the rad editor inside a web user control and using  it in another web user control. the code is given below.


setup.ascx:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
</asp:ScriptManagerProxy>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
<telerik:RadEditor ID="Editor" runat="server" StripFormattingOptions="All" EnableAjaxSkinRendering="true"
                    ToolsFile="~/Telerik/Editor/Tools.xml"  ToolbarMode="Default" Width="98%">
                    <CssFiles>
                        <telerik:EditorCssFile Value="~/App_Themes/SNAMATEST/TelerikEditor.css" />
                    </CssFiles>



</telerik:RadEditor>
 </ContentTemplate>
</asp:UpdatePanel>.

viewer.ascx
<asp:Panel ID="pnlEditor" runat="server" Style="display: none;" CssClass="glSetUpPanel">
                        <div class="glItem">
                            <gl:GlossarySetup ID="ucGlossarySet" IsCancelButtonVisible="false" IsSaveButtonVisible="false"
                                runat="server" />
                            <div class="rlMiddle" style="text-align: right;">
                                <asp:Button ID="btnGlossarySave" runat="server" Text="Save" CssClass="rlButton" OnClick="btnGlossarySave_Click" />
                                <asp:LinkButton ID="lnkGlossaryCancel" runat="server" CssClass="rlLinkBold" OnClientClick="return TogglePanel(); return false;">Cancel</asp:LinkButton>
                                <%--  <asp:LinkButton ID="lnkGlossaryCancel" PostBackUrl='<%# HigherLogic.Glossary.Business.Services.SettingsService.ViewGlossaryPage + "?GlossaryKey=" + GlossaryKey %>'
                            CausesValidation="false" runat="server">Cancel</asp:LinkButton>--%>
                            </div>
                        </div>
                    </asp:Panel>


when the page loads first, the editorpanel visibility is false. when we click on one edit link, the editor panel will be visible and can edit using the editor. after saving the data the editorpanel gets invisible. if we again click on the edit, the editorpanel will be visible but we cannot edit anythingin the editor and will not load the old data.


when searching for a   solution i got one link  which i think will be the answer and added that code in the page load of the setup.ascx,
protected void Page_Load(object sender, EventArgs e)
        {

            HtmlGenericControl link = new HtmlGenericControl("LINK");
            link.Attributes.Add("rel", "stylesheet");
            link.Attributes.Add("type", "text/css");
            link.Attributes.Add("href", HigherLogic.Business.Utilities.ResolveUrlFully("~/App_Themes/SNAMATEST/TelerikEditor.css"));
            link.Attributes.Add("href", HigherLogic.Business.Utilities.ResolveUrlFully("~/App_Themes/SNAMATEST/Editor.css"));
            Controls.Add(link);
        }.

But not resolved the issue. when i added the this code inside the pageload of viewer control, i got this error,

Server Error in '/snama' Application.

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).


Can u please help me to get out of this problem. the issue is only comes in mozilla, all other browser has no issue. i am using the telerik dll version 2008.1.515.35.


can anyone help me?

5 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 26 Dec 2008, 09:19 AM
Hi Anju,

The described server error is thrown when some of your code cannot be evaluated - e.g when you have used the code blocks <%%> in the head of the page. In order to solve this problem, I suggest to wrap the javascript code in RadCodeBlock control - this should fix the problem.

I also stringly recommend to upgrade to teh latest version of RadControls, namely 2008.3 1125 because the version you are using is very old and a lot of improvements were made since it was released and a lot of bugs - fixed. If the problem with the editor persists, please open a new support ticket and send us a sample, fully runnable demo along with detailed reproduction instructions and we will do our best to help.

All the best,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
anju
Top achievements
Rank 1
answered on 30 Dec 2008, 07:05 AM
hai,
 Thank  you for the help.
i used the latest version of rad editor, 2008.3.1125.20 and resolved the issue. it is working in all the browsers.
 But now i have another issue.

i am getting error when clicking on FindAndReplace button, and the object reference not set to .... inside the pop up window

Web.config registration missing!
 The Telerik dialogs require a HttpHandler registration in the web.config file. Please, use the control's Smart Tag to add the handler automatically, or see the help for more information: Controls > Editor > Dialogs.

i registered the web.config with dialogHandler.


<

 

system.webServer>

 

 

 

<

 

validation validateIntegratedModeConfiguration="false"/>

 

 

 

<

 

modules>

 

 

 

<

 

remove name="ScriptModule"/>

 

 

 

<

 

add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

 

 

</

 

modules>

 

 

 

<

 

handlers>

 

 

 

<

 

remove name="WebServiceHandlerFactory-Integrated"/>

 

 

 

<

 

remove name="ScriptHandlerFactory"/>

 

 

 

<

 

remove name="ScriptHandlerFactoryAppServices"/>

 

 

 

<

 

remove name="ScriptResource"/>

 

 

 

<

 

add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

 

 

<

 

add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

 

 

<

 

add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

 

 

 

<

 

add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />

 

 

 

<

 

add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />

 

 

 

<

 

add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />

 

 

 

</

 

handlers>

 

 

 

</

 

system.webServer>
  

 

 

<

 

system.web>

 

 

 

 

 

<

 

httpHandlers>

 

 

 

<

 

remove path="*.asmx" verb="*" />

 

 

 

<

 

add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 

validate="false" />

 

<

 

add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"

 

 

 

validate="false" />

 

 

 

<

 

add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"

 

 

 

validate="false" />

 

 

 

<

 

add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />

 

 

 

<

 

add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />

 

 

 

<

 

add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1125.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" />

 

 

 

</

 

httpHandlers>

 

 

 

 

</system.web>.

what could be the issue, can u help me?

 

 

 

 

 

0
Svetlina Anati
Telerik team
answered on 30 Dec 2008, 04:57 PM
Hello Anju,

I tried to built up a demo project with the provided configuration in the Web.config but unfortunately to no avail because it is not the whole of it and even after including these parts of the settings in the correct places in a web site under VS 2005 and VS 2008 I got compilation errors.

However, as far as I can see from the provided code, you are using .NET 3.5 - if so, please note that you should not use the 2008.3.1125.20  version of Telerik.Web.UI.dll but 2008.3.1125.35, which is located in the bin35 folder in the installation - you can find more details here.

I also suggest to open a new web site, ensure that the dll is the version for .NET 3.5 and then use the smart tag of the editor which is shown in design time t o register the handlers - this should work OK.

In case all the above does not help, please prepare a full demo project which consists of a page with a RadEditor, Web.config and your Bin folder along with the dll, open a new support ticket and send it to me along with detailed explanations of the error message or a screenshot and details about the VS and .NET version.

Best wishes,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
anju
Top achievements
Rank 1
answered on 01 Jan 2009, 10:48 AM
hi,
 thank you for your support.

But still i am getting that error. i am using .net framework 3.5. i prepared a test site with the latest dll version and it works there. i can't send u my code because it will not work properly there. do u have another solution for this, why this 'object refernce not set an...' error is coming inside the opener window.
 can u suggest me what all may be the causes of this error?
when i changed the editor from RadEditor.Net2.dll to telerik.web.ui version 2008.1.515, i didnt got any error. when upgraded from 2008.1.515 to 2008.3.1125.35 getting error.
please help me to get of this error.
0
Svetlina Anati
Telerik team
answered on 02 Jan 2009, 03:50 PM
Hi Anju,

As far as I understood, you have prepared a sample demo project which works as expected but you cannot get an existing one to work. If so, please try to copy the sample working demo Web.config file contents to the existing one and test again - this should fix the problem. Make also sure that you do not have old references left in the existing site.

Since I do not have your code and configuration and I cannot debug the issue I cannot tell what is the reason for it. In case this does not help, it will be nice if you provide a screenshot of the error screen along with more error details.

Kind regards,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
anju
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
anju
Top achievements
Rank 1
Share this question
or