[WebMethod]
[ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]
public string getUser(string[] username){
string[] result= new string[5];
string qry="";
for(int i=0;i<5;i++)
{
username[i]= a;
qry="SELECT * FROM USER WHERE USERNAME='" + a + "' ";
result[i] = getjsondata(qry);
return result[i];
}
}
When I try to execute a method, it shows the test form is only available for methods with primitive types as parameters. I tried out List
as parameter, that also fails. I want to pass string[]
as parameter to the WebMethod
.