I am creating a custom dropdown control that has a property of an array of SqlParameters. The property makes a neat little dialog to manage and add SqlParameters. But how do I serialize this property. After, using that dialog to add some parameters it inserts the following attribute to the control's tag:
parameters="SqlParameter[] Array"
Here's the property code:
private SqlParameter[] _parameters = new SqlParameter[0];
[ToolboxItem("SqlParameter[]"), Category("DropDown Data"),Description("These are the SqlParameters used by the command.")]
public SqlParameter[] Parameters
{
get
{
return _parameters;
}
set
{
_parameters = value;
}
}
I already have it persisting in the veiwstate by converting them back and forth into a hashtable. but how do I serialize the designer attributes?