Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 06, 2006 05:41 PM by StrongTypes
Mar 06, 2006 01:31 PM|LINK
I'm sure this is a simple one, but I can find the answer. To bring my Custom Server Control skills up-to-date, I'm creating a tab control just for the fun of it. I've been able to get a child tag to render in IntelliSense:
However, I only want IntelliSense to show Tab as an option between the opening and closing CS:TabControl tags and only allow all other server/other controls to show up/be placed inside the Tab tags. Is there an attribute or
something I need to set for that? Also, what is the attribute or something else that I have to do to get the default behavior of Tab to be rendered as <Tab></Tab> instead of <Tab /> in HTML view?
Mar 06, 2006 02:36 PM|LINK
If you are working in vs2005:
Tools>Options>Text Editor>HTML>Format>Tag Specific Options...
Let me know if this is what you need
Mar 06, 2006 02:40 PM|LINK
Tools>Options>Text Editor>HTML>Format>Tag Specific Options.
I'm looking more for the default behavior of the tag. For instance, if I start typing the Tab tag, but then type >, I want it to auto-complete it as <Tab></Tab> instead of <Tab />. I've seen some server controls do that, which
makes me arrive at the conclusion that this is an attribute or some other thing that I set in code to get that behavior.
Mar 06, 2006 05:19 PM|LINK
Mar 06, 2006 05:41 PM|LINK
In the below case i am asuming that you are treating inner contents of TabControl as properties rather than child controls.you need to apply different attriute if you want to treat inner contents as chld controls. like
[PersistChildren(true)]. I assumed inner contents of tab control would be controls.
Apply [PersistenceMode(PersistenceMode.InnerProperty)] attribute to Tab property in TabControl Class. With this you can acheive first task..you can find only <tab> control in the intellesence.
As it is, I have Tab as a property with the [PeristenceMode(PersistenceMode.InnerProperty)] attribute. I'll give the other stuff your recomended a shot. Thanks.