2

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

haddar
  • 25,377
  • 3
  • 20
  • 13

1 Answers1

4

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"];
djdd87
  • 67,346
  • 27
  • 156
  • 195