Using Editor in Asp.net with Ajax

Last post 06-20-2007, 9:07 PM by Adam. 2 replies.
Sort Posts: Previous Next
  •  06-18-2007, 5:45 PM 30874

    Using Editor in Asp.net with Ajax

    The Editor doesn't work in this condition, I want to add the editor to the page by a AsyncPostBack, but IE7 and Firefox/2.0.0.4 give me an error. Please fix this bug, or give me a way to using it.
    <%@ Page Language="C#"%>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>


    <script runat="server">

        protected void Button1_Click(object sender, EventArgs e)
        {
            Label1.Text = "Refreshed at " +
                DateTime.Now.ToString();
            Editor1.Visible = true;
        }
    </script>

    <html>
        <head runat="server">
      <title>ASP and ASP.NET WYSIWYG Editor - Ajax Support</title>
      <style type="text/css">
      #UpdatePanel1 {
      width:760px;
      }
      </style>
     </head>
     <body>
            <form runat="server">
       <table>
        <tr>
         <td valign="top" nowrap id="leftcolumn" width="160">   
         </td>
         <td width="20" nowrap></td>
         <td valign="top" width="760">
          <asp:ScriptManager ID="ScriptManager1" runat="server">
          </asp:ScriptManager>
          <h1>Ajax Support Sample</h1>
          <p style="width:760px;">To run this example, you need to install Microsoft ASP.NET AJAX on your server.</p>
          <br>
          <asp:UpdatePanel ID="UpdatePanel1" runat="server">
           <ContentTemplate>
            <fieldset>
            <legend>UpdatePanel</legend>
            <asp:Label ID="Label1" runat="server" Text="Panel created."></asp:Label><br />
            </fieldset>
           </ContentTemplate>
           <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Button1" />
           </Triggers>
          </asp:UpdatePanel>
          <br>
          <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
          <asp:UpdatePanel ID="UpdatePanel2" runat="server">
           <ContentTemplate>
             <CE:Editor id="Editor1" AutoConfigure="Simple" EditorWysiwygModeCss="example.css" runat="server" Visible="false" ></CE:Editor><br />
           </ContentTemplate>
          </asp:UpdatePanel>
          
         </td>
        <tr>
       </table>   
      </form>
     </body>
    </html>

  •  06-20-2007, 8:00 PM 30934 in reply to 30874

    Re: Using Editor in Asp.net with Ajax

    no one meet this issue? Please give me some advice.

  •  06-20-2007, 9:07 PM 30936 in reply to 30934

    Re: Using Editor in Asp.net with Ajax

    KaneZMY,
     
    Try set the EnablePartialRendering property of ScriptManager to false.
     
    Code:
     
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="false">
    </asp:ScriptManager>
     
    Keep me posted.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML