P
PeterKellner
I'm wanting a list of strings as an attribute for my custom server
control. I can get a single string to work but when I change my
declaration to string[], I get in error when the control instantiates
saying can't create object of type System.String[].
Can someone tell me what the correct way to declare the string[] is?
This is what I have that does not work:
[Category("Data")]
[Themeable(false)]
[Description("Get or Sets the List of Roles To Include")]
public virtual string[] RolesToInclude
{
get
{
string[] o = (string[]) ViewState["RolesToInclude"];
if (o == null)
return null;
return (string[])o;
}
set { ViewState["RolesToInclude"] = value; }
}
Peter Kellner
http://peterkellner.net
control. I can get a single string to work but when I change my
declaration to string[], I get in error when the control instantiates
saying can't create object of type System.String[].
Can someone tell me what the correct way to declare the string[] is?
This is what I have that does not work:
[Category("Data")]
[Themeable(false)]
[Description("Get or Sets the List of Roles To Include")]
public virtual string[] RolesToInclude
{
get
{
string[] o = (string[]) ViewState["RolesToInclude"];
if (o == null)
return null;
return (string[])o;
}
set { ViewState["RolesToInclude"] = value; }
}
Peter Kellner
http://peterkellner.net