I am invoking a web service function which is reading a users credentials from a database,
when invoked straight from the web service based on entering a ‘search’ integer, the response is –
<firstName>john</firstName>
<lastName>smith</lastName>
<sex>male</sex>
<age>23</age>
<search>100</search>
I am trying to get the results back to the client in a richTextBox I thought by doing this-
WebService.Service1SoapClient client = new WebService.Service1SoapClient();
int search= System.Convert.ToInt16(textBox1.Text);
string result = client.searchUser(search);
richTextBox1.AppendText(result);
However this is not working.
From your comments,
you are trying to assign at structure to a string. That’s the error and compiler is telling you that you can’t do this.
You should
overrideToString()method in your structure like,and at your client side
Hopefully it will help.