Display array values from web service method

Posted by chupinette on Stack Overflow See other posts from Stack Overflow or by chupinette
Published on 2010-05-30T15:55:09Z Indexed on 2010/05/30 16:02 UTC
Read the original article Hit count: 280

Filed under:
|

Hello all! I'm new to web services and im actually trying to learn how to develop one in C#. I have the following method in my web service which actually displays an array of int when i test it.

[WebMethod]
    public int[] FindID(string str1,string str2)
    {
        Customer obj = new Customer();

        obj.FindMatch(str1,str2);
        return obj.customer_id;
     }

Now in my web application in which i have a button, the code is as below:

Dim obj As localhost.Service = New localhost.Service
Dim str1 As String = Session("str1")
Dim str2 As String = Session("str2")
Response.Write(obj.FindID(str1, str2))

The problem is that only the first value from the array is being displayed. Can anyone please help me to solve this problem?

© Stack Overflow or respective owner

Related posts about c#

Related posts about web-services