Re: RTE Dialogs Fail in .ascx User Control

  •  05-19-2014, 6:09 AM

    Re: RTE Dialogs Fail in .ascx User Control

     Hi,

     

    I have tried load the user control programmatically in event Page_Load, it works for me too. Below is the code what I am testing. Does this way work for you too?

     

     

    1. <%@ Page Language="c#" ValidateRequest="false" %>  
    2.   
    3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    4. <html xmlns="http://www.w3.org/1999/xhtml">  
    5.     <script runat="server">  
    6.         protected override void OnLoad(EventArgs e)  
    7.         {  
    8.             Control cc = this.LoadControl("~/WebUserControl.ascx");  
    9.             cc.ID = "editor1";  
    10.             panel1.Controls.Add(cc);  
    11.             base.OnLoad(e);  
    12.         }  
    13.     </script>  
    14. <body>  
    15.     <form id="Form1" method="post" runat="server">  
    16.         <asp:Panel ID="panel1" runat="server"></asp:Panel>  
    17.     </form>  
    18. </body>  
    19. </html>  

    Regards,

     

    Ken 

View Complete Thread