Using CuteEditor in codebehind

Last post 11-26-2004, 4:34 PM by Adam. 3 replies.
Sort Posts: Previous Next
  •  11-25-2004, 6:00 PM 2596

    Using CuteEditor in codebehind

    Im writing all my code in the codebehind file.

    publicclass Default : Page

    {

      protectedoverridevoid OnInit(EventArgs e)

      {

        base.OnInit (e);

        HtmlForm MyForm = new HtmlForm();

        MyForm.ID = "Form1";

        Controls.Add( MyForm );


        CuteEditor.Editor Editor1 = new CuteEditor.Editor();

        Editor1.ID = "Editor1";

        MyForm.Controls.Add( Editor1 );

      }

    }
    But somehow its not working, i get the following error. anyone know how to fix this ?

    Server Error in '/Area51' Application.
    --------------------------------------------------------------------------------

    Object reference not set to an instance of an object.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       CuteEditor.a.g(HtmlTextWriter A_0) +9
       CuteEditor.a.i(HtmlTextWriter A_0) +57
       CuteEditor.Editor.Render(HtmlTextWriter writer) +43
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
       System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
       System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
       System.Web.UI.Control.Render(HtmlTextWriter writer)
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
       System.Web.UI.Page.ProcessRequestMain()

     


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

     

  •  11-26-2004, 3:15 AM 2597 in reply to 2596

    Re: Using CuteEditor in codebehind

    If I switch the dll to version 3 everything runs fine.

    So please fix this so i can place my order.
  •  11-26-2004, 12:26 PM 2606 in reply to 2596

    Re: Using CuteEditor in codebehind

    Thanks , We forgot to check this way before publish .
    Now the problem have been resolved.
    Regards , Terry .
  •  11-26-2004, 4:34 PM 2627 in reply to 2606

    Re: Using CuteEditor in codebehind

View as RSS news feed in XML