N
Nguyen Ly
Hi,
I have a composite web custom control consisting of a textbox, a button, and
a dropdownlist..
I'm trying to expose the Items property from the dropdownlist and it works
fine if I use code to populate the drop down.
When I try to use the Collection editor to add in ListItems by clicking on
the three "..." button next to the Items property, it sort of adds in the
ListItems but the HTML view on the aspx page doesn't show child listitem
controls the way the the DropDownList control does..
ie it does <custom:MyControl id="MyCustomControl" Items="(Collections)" ...
so when I build .. theres an error saying the Items property is read only.
I want the ability to use the visual design-time collection editor with my
composite control in VS so when I click on the three "..." button next to
the Items property.. it allows me to add in ListItems just like the
DropDownList does, and puts in something like this:
<custom:MyControl id="MyCustomControl">
<asp:ListItem value="1">One</asp:ListItem>
<asp:ListItem value="1">Two</asp:ListItem>
</custom:MyControl>
Does anyone know how I can go about doing this?
Thanks for your time
I have a composite web custom control consisting of a textbox, a button, and
a dropdownlist..
I'm trying to expose the Items property from the dropdownlist and it works
fine if I use code to populate the drop down.
When I try to use the Collection editor to add in ListItems by clicking on
the three "..." button next to the Items property, it sort of adds in the
ListItems but the HTML view on the aspx page doesn't show child listitem
controls the way the the DropDownList control does..
ie it does <custom:MyControl id="MyCustomControl" Items="(Collections)" ...
so when I build .. theres an error saying the Items property is read only.
I want the ability to use the visual design-time collection editor with my
composite control in VS so when I click on the three "..." button next to
the Items property.. it allows me to add in ListItems just like the
DropDownList does, and puts in something like this:
<custom:MyControl id="MyCustomControl">
<asp:ListItem value="1">One</asp:ListItem>
<asp:ListItem value="1">Two</asp:ListItem>
</custom:MyControl>
Does anyone know how I can go about doing this?
Thanks for your time