Problem rendering child controls when creating a custom control library

Discussion in 'ASP .Net' started by Scott Yenor, Jan 22, 2004.

  1. Scott Yenor

    Scott Yenor Guest

    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
     
    Scott Yenor, Jan 22, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Rodriguez
    Replies:
    23
    Views:
    1,130
    David Schwartz
    Dec 9, 2003
  2. Chad Scharf
    Replies:
    3
    Views:
    886
    Chad Scharf
    Oct 18, 2007
  3. Replies:
    0
    Views:
    207
  4. Replies:
    1
    Views:
    181
    Teemu Keiski
    Dec 8, 2005
  5. Replies:
    1
    Views:
    189
    Teemu Keiski
    Dec 8, 2005
Loading...

Share This Page