haddar
haddar

Reputation: 25665

jquery autocomplete extraParams

Im using jquery autocomplete can I pass extraParams to webservice in asp.net ? and how will my [WebMethod] get it ?

Upvotes: 2

Views: 4047

Answers (1)

djdd87
djdd87

Reputation: 68456

You pass an extra params function as follows:

$("#controlId").setOptions(
                    {
                        extraParams:
                        {
                            extra: function()
                            {
                                return "Something";
                            }
                        }
                    }
                );

You then retrieve this in your webservice using:

    string yourParam = <HttpContext Goes Here>.QueryString["extra"];

Upvotes: 4

Related Questions