Ignore literal content when parsing custom control children?

Discussion in 'ASP .Net Building Controls' started by Donal McWeeney, Sep 3, 2004.

  1. Hi,

    I'm sure this has been asked before...

    Is there a setting or attribute that I can specify on my control to tell the
    page parser to ignore literal content when parsing children of my custom
    control?

    I'm overriding RenderChildren of my parent control and the literal content
    is causing me so headaches.

    Also is there a best practices document on creating custom controls.

    Any ideas gratefully appreciated.

    Thanks

    Donal
    Donal McWeeney, Sep 3, 2004
    #1
    1. Advertising

  2. Donal McWeeney

    Teemu Keiski Guest

    Hi,

    by overriding AddParsedSubObject method of your control you can control that
    are LiteralControls added Also ControlBuilder can help you

    Here is one article discussing these
    http://www.codeproject.com/aspnet/NoSpamEmailRendering.asp


    --
    Teemu Keiski
    MCP, Microsoft MVP (ASP.NET), AspInsiders member
    ASP.NET Forum Moderator, AspAlliance Columnist
    http://blogs.aspadvice.com/joteke



    "Donal McWeeney" <> wrote in message
    news:...
    > Hi,
    >
    > I'm sure this has been asked before...
    >
    > Is there a setting or attribute that I can specify on my control to tell

    the
    > page parser to ignore literal content when parsing children of my custom
    > control?
    >
    > I'm overriding RenderChildren of my parent control and the literal content
    > is causing me so headaches.
    >
    > Also is there a best practices document on creating custom controls.
    >
    > Any ideas gratefully appreciated.
    >
    > Thanks
    >
    > Donal
    >
    >
    Teemu Keiski, Sep 5, 2004
    #2
    1. Advertising

  3. Hi Teemu,

    thanks for the pointer, will check it out...

    Donal
    Donal McWeeney, Sep 6, 2004
    #3
    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. Stephen Miller
    Replies:
    12
    Views:
    741
    Stephen Miller
    Jan 20, 2004
  2. gozza

    Parsing Children and embeded custom controls

    gozza, Jan 27, 2004, in forum: ASP .Net Building Controls
    Replies:
    3
    Views:
    160
    gozza
    Jan 27, 2004
  3. Mariusz

    parsing many children in control

    Mariusz, Dec 22, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    87
    Mariusz
    Dec 22, 2004
  4. Anonieko Ramos

    What's wrong with rpc-literal? Why use doc-literal?

    Anonieko Ramos, Sep 27, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    362
    Anonieko Ramos
    Sep 27, 2004
  5. Rob Meade
    Replies:
    6
    Views:
    254
    Rob Meade
    Mar 1, 2004
Loading...

Share This Page