I want to pass an int list (List) as a declarative property to a web user control like this:
You can pass it into a string and split on comma to populate a private variable. Does not have the nicety of attribution, but will work.
private List modules;
public string ModuleIds
{
set{
if (!string.IsNullOrEmpty(value))
{
if (modules == null) modules = new List();
var ids = value.Split(new []{','});
if (ids.Length>0)
foreach (var id in ids)
modules.Add((int.Parse(id)));
}
}