Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Problem rendering child controls when creating a custom control library

Reply
Thread Tools

Problem rendering child controls when creating a custom control library

 
 
Scott Yenor
Guest
Posts: n/a
 
      01-22-2004
Hello,

I am writing a control library that has a control that inherits from
System.Web.UI.Control. The control works fine and I am able to loop
through the child controls and display everything fine until I try to
put some ASP.NET processing code in-between the tags.

For example:

This works fine. The control executes and displays everything just
fine.

<myctl:Zone Class="myclass">
<P>
Some child controls between my custom control.
<P>
</myctl:Zone>

The following doesn't work. The control executes, but when I try to
display the child controls, they don't seem to exist. I have checked
the value of the IsLiteralContent and have found that on the above
example, the IsLiteralContent is true, but on the following example,
it is false.

<myctl:Zone Class="myclass">
<P>
<%= DateTime.Now; %>
</myctl:Zone>

I haven't been able to find anything about getting the code to process
before the custom control processes. How do I get this to work? Is
there a way to get the ASP processing block to process before the
control class does its rendering so the content is a literal control?

Please help. I have spent too much time trying to figure it out.

Regards,

Scott Yenor
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
this.Controls.Add(Control) Does Not Add Control to child collection (this.Controls.Count == 0) Chad Scharf ASP .Net 3 10-18-2007 03:53 PM
Control.Controls bug? Control's child controls missing at the run time. sinelnikov.andrei@gmail.com ASP .Net Building Controls 1 12-08-2005 06:47 AM
Control.Controls bug? Control's child controls missing at the run time. sinelnikov.andrei@gmail.com ASP .Net Web Controls 1 12-08-2005 06:46 AM
HELP! Child controls of child controls not visible to web app lisa@starways.net ASP .Net Building Controls 0 05-05-2005 09:14 PM
How do I: Main thread spawn child threads, which child processes...control those child processes? Jeff Rodriguez C Programming 23 12-09-2003 11:06 PM



Advertisments