I am looking to create a user/server control that will be created with something like the following:
You can add a property on a user control's code behind like:
[PersistenceMode(PersistenceMode.InnerProperty)]
public List Items
{
get;
set;
}
Your markup would then be:
To make it so ListItem can be your own list item (Which I recommend doing as opposed to using asp.net.) You'll want to create your own class.
Here's an example of a Server Control I use (I removed a lot of the noise as such this is just a skeleton):
[ToolboxData("<{0}:Menubar runat=server>{0}:Menubar>")]
[System.ComponentModel.DesignTimeVisible(false)]
public class Menubar : WebControl, IPostBackEventHandler
{
private List
Now I can use this like: