A
Andrew Reeves
I have a web user control which has several properties on
it. On of these properties needs to be an array. I have
no problem with
<uc1:MyControl id="Control1"
MyProperty="xyz"></uc1:MyControl>
but how do I declare an array? I have tried the following
<uc1:MyControl id="Control1">
<MyClass MyProperty="x" />
<MyClass MyProperty="y" />
<MyClass MyProperty="z" />
</uc1:MyControl>
where MyClass is a property of type MyClassArray[] class
with a public property of MyProperty and the User Control
has the following (C#)
MyClassArray[] myClass;
public MyClassArray[] MyClass
{
set
{
myClass= value;
}
}
but it doesn't seem to work.
I notice that the DataGrid seems to do this with it's
columns.
Thanks
Andrew Reeves
it. On of these properties needs to be an array. I have
no problem with
<uc1:MyControl id="Control1"
MyProperty="xyz"></uc1:MyControl>
but how do I declare an array? I have tried the following
<uc1:MyControl id="Control1">
<MyClass MyProperty="x" />
<MyClass MyProperty="y" />
<MyClass MyProperty="z" />
</uc1:MyControl>
where MyClass is a property of type MyClassArray[] class
with a public property of MyProperty and the User Control
has the following (C#)
MyClassArray[] myClass;
public MyClassArray[] MyClass
{
set
{
myClass= value;
}
}
but it doesn't seem to work.
I notice that the DataGrid seems to do this with it's
columns.
Thanks
Andrew Reeves