Control render problem...

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
 
S

Scott Allen

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top