Adding layout elements within custom control

Discussion in 'ASP .Net Building Controls' started by paul.hester@gmail.com, Aug 1, 2006.

  1. Guest

    Hi all,

    I have a custom control that I use within forms that contains form
    inputs and validator controls. At the moment I'm overriding the Render
    method of my custom control and using the HtmlTextWriter object to
    render the layout elements and the Control.RenderControl method in the
    appropriate places to render the child controls in the right place.

    I've run into a problem where literal content (i.e. <%= SomeVariable
    %>) is not being rendered, and from what I can understand, it's because
    of the way I'm rendering the child controls.

    Could someone please advise me of the best way to add layout elements
    around the child controls and with the literal content intact? Do I
    need to override another method and add the extra layout elements to
    the Controls collection?

    Thanks,

    Paul
    , Aug 1, 2006
    #1
    1. Advertising

  2. hi Paul, in case you missed my reply to this same post on the WebControls
    group, here it is :
    http://groups.google.com/group/micr...0888f?lnk=st&q=&rnum=1&hl=en#9526ae015a40888f

    Regards,
    Alessandro Zifiglio
    http://www.AsyncUI.net

    <> ha scritto nel messaggio
    news:...
    > Hi all,
    >
    > I have a custom control that I use within forms that contains form
    > inputs and validator controls. At the moment I'm overriding the Render
    > method of my custom control and using the HtmlTextWriter object to
    > render the layout elements and the Control.RenderControl method in the
    > appropriate places to render the child controls in the right place.
    >
    > I've run into a problem where literal content (i.e. <%= SomeVariable
    > %>) is not being rendered, and from what I can understand, it's because
    > of the way I'm rendering the child controls.
    >
    > Could someone please advise me of the best way to add layout elements
    > around the child controls and with the literal content intact? Do I
    > need to override another method and add the extra layout elements to
    > the Controls collection?
    >
    > Thanks,
    >
    > Paul
    >
    Alessandro Zifiglio, Aug 2, 2006
    #2
    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. Jonah Olsson
    Replies:
    1
    Views:
    570
    Scott Allen
    Apr 5, 2005
  2. Hardeep Rakhra
    Replies:
    3
    Views:
    889
    Hardeep Rakhra
    Feb 7, 2004
  3. Replies:
    1
    Views:
    571
    John Timney \(MVP\)
    Jun 19, 2006
  4. Matt Sokol
    Replies:
    2
    Views:
    375
    Theo Tillotson
    Aug 7, 2003
  5. Adding layout elements within custom control

    , Aug 1, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    172
    Alessandro Zifiglio
    Aug 1, 2006
Loading...

Share This Page