How to set list property in user control?

P

Peter Kirk

Hi

I am trying to create a user-control, which has several properties - for
texts for labels etc. Setting string properties is simple, but what if I
want a property which is a list - how do I set a list? For example if I want
to be able to supply a list of ListItem objects.

For example, I want to declare the control on my page like this:

<PK:MyControl id="mycontrol" runat="server" name="some text" list=.... />

Where 'name' is a string property which I use for the text for a label in my
control for example. But how do I make a property which is a list of
ListItem objects in my control and set it on my page as above?

Thanks for any advice,
Peter
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top