Control render problem...

  • Thread starter Thread starter Jeti [work]
  • Start date Start date
J

Jeti [work]

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
 
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.
 
Back
Top