asp.net server controls

Posted by Richard Friend on Stack Overflow See other posts from Stack Overflow or by Richard Friend
Published on 2010-06-10T15:21:58Z Indexed on 2010/06/10 15:22 UTC
Read the original article Hit count: 313

Filed under:
|
|
|
|

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>

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET