Control render problem...

Discussion in 'ASP .Net' started by Jeti [work], Sep 30, 2004.

  1. Jeti [work]

    Jeti [work] Guest

    I'm using ASP.NET (Framework 1.1), and have encountered folowing problem:

    I have testing page: "testing.aspx", and i have created two controls
    (register and htmlEditor).
    register control contains two instances of htmlEditor, but only textarea
    (from htmleditor) renderes (java script should be rendered too!)...

    Dont have source here, but i was hoping that maybe this is trivial, and you
    would know how to make it work.

    HTMLEditor (contains client script) - works fine when rendered on the aspx
    directly.
    Register - works fine, but when hemlEditor is placed on it - doesn't work

    protected override Render (htmlTextWriter writer) // Register control
    {
    //...
    HtmlEditor ed = new HtmlEditor ();
    ed.RenderControl (writer);
    //...
    }

    when i debug, only htmlEditor constructor is called, no render and prerender
    method called...


    please help
     
    Jeti [work], Sep 30, 2004
    #1
    1. Advertising

  2. I hope the following link will help. It is a link to the online Microsoft
    complete ASP.Net reference for building custom Controls:

    http://msdn.microsoft.com/library/en-us/cpguide/html/cpcondevelopingwebformscontrols.asp?frame=true

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    I get paid good money to
    solve puzzles for a living

    "Jeti [work]" <> wrote in message
    news:...
    > I'm using ASP.NET (Framework 1.1), and have encountered folowing problem:
    >
    > I have testing page: "testing.aspx", and i have created two controls
    > (register and htmlEditor).
    > register control contains two instances of htmlEditor, but only textarea
    > (from htmleditor) renderes (java script should be rendered too!)...
    >
    > Dont have source here, but i was hoping that maybe this is trivial, and

    you
    > would know how to make it work.
    >
    > HTMLEditor (contains client script) - works fine when rendered on the aspx
    > directly.
    > Register - works fine, but when hemlEditor is placed on it - doesn't work
    >
    > protected override Render (htmlTextWriter writer) // Register control
    > {
    > //...
    > HtmlEditor ed = new HtmlEditor ();
    > ed.RenderControl (writer);
    > //...
    > }
    >
    > when i debug, only htmlEditor constructor is called, no render and

    prerender
    > method called...
    >
    >
    > please help
    >
    >
     
    Kevin Spencer, Sep 30, 2004
    #2
    1. Advertising

  3. Jeti [work]

    Scott Allen Guest

    Hi Jeti:

    I think we'd need to see some more source code to make sense of it.
    Which control is the Render method from? You generally want to avoid
    creating controls in the render method. Instead, build them so that
    you can add them to an ASPX page as a user control or custom web
    control, then they have a better chance of working with the page
    lifecycle events.

    --
    Scott
    http://www.OdeToCode.com/

    On Thu, 30 Sep 2004 08:09:28 +0200, "Jeti [work]"
    <> wrote:

    >I'm using ASP.NET (Framework 1.1), and have encountered folowing problem:
    >
    >I have testing page: "testing.aspx", and i have created two controls
    >(register and htmlEditor).
    >register control contains two instances of htmlEditor, but only textarea
    >(from htmleditor) renderes (java script should be rendered too!)...
    >
    >Dont have source here, but i was hoping that maybe this is trivial, and you
    >would know how to make it work.
    >
    >HTMLEditor (contains client script) - works fine when rendered on the aspx
    >directly.
    >Register - works fine, but when hemlEditor is placed on it - doesn't work
    >
    >protected override Render (htmlTextWriter writer) // Register control
    >{
    > //...
    > HtmlEditor ed = new HtmlEditor ();
    > ed.RenderControl (writer);
    > //...
    >}
    >
    >when i debug, only htmlEditor constructor is called, no render and prerender
    >method called...
    >
    >
    >please help
    >
     
    Scott Allen, Sep 30, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    723
  2. Lau Lei Cheong

    Page.Render do not render complete page

    Lau Lei Cheong, May 15, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,078
    Lau Lei Cheong
    May 15, 2004
  3. Replies:
    1
    Views:
    383
    Teemu Keiski
    Jul 2, 2003
  4. Pete
    Replies:
    0
    Views:
    152
  5. Glenn Gillen
    Replies:
    0
    Views:
    280
    Glenn Gillen
    Nov 17, 2006
Loading...

Share This Page