Control with no closing tag

Discussion in 'ASP .Net Building Controls' started by Peter Zolja, Jan 19, 2007.

  1. Peter Zolja

    Peter Zolja Guest


    I'm trying to build a custom control that doesn't have a closing tag. For
    example, right now when I create a control from the IDE I get this:

    <cc1:MyControl runat="server" ID="SomeId"></cc1:MyControl>

    I'd like it to be:

    <cc1:MyControl runat="server" ID="SomeId" />

    This control won't have any content, so I'm trying to make the definition
    shorter. I know it can be done because ImageButton does this; the question
    is how?

    Peter Zolja, Jan 19, 2007
    1. Advertisements

  2. Nathaniel Greene, Jan 20, 2007
    1. Advertisements

  3. Peter Zolja

    Peter Zolja Guest

    I think I had seen that adding [ParseChildren(false)] at the top of my
    That was one of the things I tried before posting, but it doesn't seem to
    work. We had some issues with VS too; what we did was to slipstream the SP1
    into the kit and reinstall the whole thing. Surprisingly (or maybe not) it
    took less to do the slipstream, uninstall, and then reinstall the new
    version than simply installing SP1 on top. I hope you get it working...
    Peter Zolja, Jan 22, 2007
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.