473,778 Members | 5,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Control render problem...

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

I have testing page: "testing.as px", 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.RenderContro l (writer);
//...
}

when i debug, only htmlEditor constructor is called, no render and prerender
method called...
please help
Nov 18 '05 #1
2 1557
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**@programer i.org> wrote in message
news:uZ******** ******@TK2MSFTN GP10.phx.gbl...
I'm using ASP.NET (Framework 1.1), and have encountered folowing problem:

I have testing page: "testing.as px", 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.RenderContro l (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**@programer i.org> wrote:
I'm using ASP.NET (Framework 1.1), and have encountered folowing problem:

I have testing page: "testing.as px", 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.RenderContro l (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
2342
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 modules/controls (eg a newsfeed, quick phonelist, login, etc.) But the controls end up too 'deep': it appears that it would be lighter/better if I could just enherit the uc_login.aspx directly off of the uc_container.aspx so that all modules have the same...
2
3183
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 problems that I have encountered to date and the solutions (if any) that I found. http://users.adelphia.net/~brianpclab/ServerControlCollectionIssues.htm This page also has all of the source code in a compressed file that you are free to download...
7
3019
by: Shimon Sim | last post by:
I have a custom composite control I have following property
7
2707
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 server returned an error: (500) Internal Server Error." I found a post that suggested to catch the WebException to retrieve the actual HttpWebResponse object for more information. The response returned is shown below. At first I thought this was a...
7
6541
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 assign to get this working. Here is some sample code: namespace WebControlLibrary1 {
4
4357
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 (which it is) Tried googling but only good for C# and classic asp. Has anyone seen or has a solution??
5
2344
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 problem in this scenario: <myprefix:mycontrol runat="server"> <%= SomeVariable %> </myprefix:mycontrol>
3
2132
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 control itself. So when I render, I generate a proxy HtmlInputHidden like so: protected virtual void Render(HtmlTextWriter writer) { HtmlInputHidden hiddenInput = new HtmlInputHidden(); hiddenInput.ID = ClientID; hiddenInput.Name = UniqueID;
0
2487
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 render it within my control it crashes and burns. I've even tried placing it within another control (a PlaceHolder) and tried to render the PlaceHolder to no avail. Any ideas on how to fix this problem? Here's my code:
0
9629
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9470
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10127
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8957
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7475
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4033
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2865
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.