Sending multiple parameters to AutoComplete extender in asp.net using web method RRS feed

All replies

  • User-1838255255 posted

    Hi kengkit,

    About pass multiple parameters to webmethod or webservice with AutoComplete extender, you could use ContextKey property.

    1. You could use UseContextKey ="true".

    2. You could set the value of the contextkey in JS.

    Sample Code:  

    <asp:TextBox ID="txtContactsSearch" runat="server" onkeyup = "SetContextKey()"></asp:TextBox>
    <cc1:AutoCompleteExtender ServiceMethod="SearchCustomers"
        CompletionInterval="100" EnableCaching="false" CompletionSetCount="10" 
        TargetControlID="txtContactsSearch" UseContextKey = "true"
        ID="AutoCompleteExtender1" runat="server" FirstRowSelected = "false">

    For more details, please refer to these tutorials:

    ASP.Net AJAX AutoCompleteExtender: Pass Additional Parameter to WebMethod using ContextKey:


    Best regards,

    Eric Du

    Friday, May 26, 2017 7:34 AM