server controls complex properties with sub collections.
- by Richard Friend
Okay i have a custom server control that has some autocomplete settings, i have this as follows and it works fine.
    /// <summary>
    /// Auto complete settings
    /// </summary>
    [System.ComponentModel.DesignerSerializationVisibility    (System.ComponentModel.DesignerSerializationVisibility.Content),
    PersistenceMode(PersistenceMode.InnerProperty),
    Category("Data"), Description("Auto complete settings"), NotifyParentProperty(true)]
    public AutoCompleteLookupSettings AutoComplete { private set; get; }
I also have a ParameterCollection that is really related to the auto complete settings, currently this collection resides off the control itself like so :
    /// <summary>
    /// Parameters for any data lookups
    /// </summary>
    [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content), PersistenceMode(PersistenceMode.InnerProperty)]
    public ParameterCollection Parameters { get; set; }
What i would like to do is move the parameter collection inside of the AutoCompleteSettings as it really relates to my autocomplete, i have tried this but to no avail..
I would like to move from 
<cc1:TextField ID="TextField1" runat='server'>
    <AutoComplete MethodName="GetTest" TextField="Item1" TypeName ="AppFrameWork.Utils" />
    <Parameters>
        <asp:ControlParameter ControlID="txtTest" PropertyName="Text" Name="test" />
    </Parameters>
</cc1:TextField>
To
<cc1:TextField ID="TextField1" runat='server'>
    <AutoComplete MethodName="GetTest" TextField="Item1" TypeName ="AppFrameWork.Utils" >
        <Parameters>
            <asp:ControlParameter ControlID="txtTest" PropertyName="Text" Name="test" />
        </Parameters>
    </AutoComplete>
</cc1:TextField>