We help IT Professionals succeed at work.

How to get items collection to show up

Tom Knowlton
Tom Knowlton asked
I have a Web User Control I am writing.

At design time I want to have a Collection of OTHER Web User Controls that shows up in the Properties window.

How do I do this?
Watch Question

Hi, I believe that this particular functionality is only supported when you're creating custom controls and not for user controls.
what joe mentions above might be correct .. but just try defining your custom property of the user control like this ..
        Public Property MyCustomPropery() As String

Tom KnowltonWeb developer


Let's switch gears for a minute and assume I am working with a custom control .. not an .ascx.

How could I get the Collection to show-up in the Properties window with an elipse button and all the bells and whistles.

I want to mimic the functionality you see for an Items (Collection) in regular asp controls such as a DropDownList, ListBox, or RadioButtonList -- where you see Items  (Collection) in the Properties window and you click on the button and it brings up a Window where you can add or remove items.

Are there any good books or websites that walk you through how to do this?
did you try what I menioted above .. it does give the ellipse and list all the controls in the page .. i was not able to get it to filter out specific types ..


Explore More ContentExplore courses, solutions, and other research materials related to this topic.