Re: Creating a Control Server Side

  •  09-27-2014, 6:17 AM

    Re: Creating a Control Server Side

    Hi danpc,

     

    Did you set id for the editor control? Can you try the example page below? Does it work for you?

     

    1. <%@ Page Language="C#" AutoEventWireup="true" %>  
    2.   
    3. <%@ Register TagPrefix="RTE" Namespace="RTE" Assembly="RichTextEditor" %>  
    4.   
    5. <!DOCTYPE html>  
    6.   
    7. <html xmlns="http://www.w3.org/1999/xhtml">  
    8. <head id="Head1" runat="server">  
    9.     <title></title>  
    10.  <script runat="server">  
    11.      protected override void OnLoad(EventArgs e)  
    12.      {  
    13.          RTE.Editor myeditor = new Editor();  
    14.          myeditor.ID = "editor1";  
    15.          panel1.Controls.Add(myeditor);  
    16.          base.OnLoad(e);  
    17.      }  
    18.  </script>  
    19. </head>  
    20. <body>  
    21.     <form id="form1" runat="server">  
    22.     <asp:Panel ID="panel1" runat="server"></asp:Panel>  
    23.     </form>  
    24. </body>  
    25. </html>  
     

    Regards,

     

    Ken 

View Complete Thread