TextBox with AutoCompleteExtender and DropDownExtender RRS feed

  • Question

  • User485318798 posted


    I have a TextBox and want to use it with  AutoCompleteExtender and DropDownExtender. It works fine with an AutoCompleteExtender. it works fine with an AutoCompleteExtender:

     <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">  
                        <asp:TextBox ID="tbLogin" runat="server" AutoPostBack="true" Visible="true"/>
                        <asp:AutoCompleteExtender ID="tbLogin_AutoCompleteExtender" runat="server" 
                            DelimiterCharacters="" Enabled="True" ServicePath="" TargetControlID="tbLogin" 
                            UseContextKey="True" ServiceMethod ="GetUserList" MinimumPrefixLength="1">

    Now i want to use a DropDownExtender:

    <asp:DropDownExtender ID="tbLogin_DropDownExtender" runat="server" DynamicControlID="tbLogin_DropDownExtender" TargetControlID="tbLogin">

    It keeps asking me for a DropDownControlID and a ServiceMethod. For Service Method i added DynamicServiceMethod="GetUserList". I get error message

    JavaScript: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
    Parameter name: element

    All i want is when i click on the DropDown i want to have the List that i get from the WebMethod GetUserList and show it on the TextBox. I don't want to use MinimumPrefixLength="0" to show all the List but only if i click the DropDown.

    Thank you.

    Thursday, October 17, 2013 3:10 AM


All replies