473,385 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Control render problem...

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
Nov 18 '05 #1
2 1535
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...asp?frame=true

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

"Jeti [work]" <je**@programeri.org> wrote in message
news:uZ**************@TK2MSFTNGP10.phx.gbl...
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

Nov 18 '05 #2
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]"
<je**@programeri.org> 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


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Sky | last post by:
What I have currently: I have a user control called mod_container.aspx that is basically two divs -- the top a toolbar, that expands/collapse the second div which can contain other...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
7
by: Jonas | last post by:
Hi. I'm trying to develop a web custom control that uses a programmatically created treeview. My problem is that I get an exception when I try to render the control. With properties do I have to...
4
by: James Page | last post by:
I can't seem to get HtmlTextWriter / renderControl to work for sending a control (html) in an e-mail messsage (VB.NET). Keeps telling me that control needs to be in a form tag with runat server...
5
by: paul.hester | last post by:
Hi all, I have a custom control with an overridden Render method. Inside this method I'm rendering each control in its collection using their RenderControl method. However, I'm running into a...
3
by: dcassar | last post by:
I am working on a complex server control that dynamically creates an HtmlInputHidden control that stores its value. As far as the postback process is concerned, this hidden input acts as the...
0
by: apenly | last post by:
Hi all- I'm trying to Render a TreeView in a custom control, but I'm receiving a NullReferenceException at runtime. If I put the TreeView on the page it works fine, but as soon as I try to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.