passing parameters to web service
-
hi, m learning Auto completion Ajax control , i wort a web service execute a query and sends back array of string to the page, how can i passing criteria to this web service by a parameter?
-
hi, m learning Auto completion Ajax control , i wort a web service execute a query and sends back array of string to the page, how can i passing criteria to this web service by a parameter?
Basically the web method signature should not be altered. It should be only of the form
public static string[] GetCompletionList(string prefixText, int count, string contextKey) { .... }
Here prefixText = field value (on which the details has to be filtered) count = number of values to be returned in the array contextKey = the Column name on which the prefixText has to be applied. And moreover, if you want to pass more parameter to this web service - you have two options, 1. Pass using Session variables by enabling the Session in web method 2. You can append values to the contextKey with some delimitters and in the web method you can make use of a split function to read the parameters passed. Hope this helps you. Regards, Vengat -
hi, m learning Auto completion Ajax control , i wort a web service execute a query and sends back array of string to the page, how can i passing criteria to this web service by a parameter?
Create a proxy of the webservice and then create an instance of that proxy class.
DEVELOPER DAY SCOTLAND 2009 Watch this space http://www.developerdayscotland.com/[^]