Link to home
Start Free TrialLog in
Avatar of kinton
kinton

asked on

ASP.Net Bind a Web service to a variable

Hi,

I have a web service that I call in the following manner in my ASP.Net application.

    Dim ConsumeWebService As uk.co.education.www.EducationDirectRegistration
            ConsumeWebService = New uk.co.education.www.EducationDirectRegistration
         

This returns just one field, and I want to bind the field to a variable within my project.  I cannot find any examples on how to do this.  Any examples would be appreciated!?

I'm guessing it would be something along the following lines..

  VARIABLENAME.VALUE = ConsumeWebService.GetStatementAnswers(Username, Password, PAR1, PAR2)

thanks

Avatar of kinton
kinton

ASKER

It should be noted, the web service is returning the data as a dataset
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kinton

ASKER

ok, that seems to work, how can I pull the individual values out of that dataset?
Here is an example of one way:

Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim name As String = row("Name").ToString()

It really depends on what you need as to how to best handle it.

Bob
Avatar of kinton

ASKER

That's perfect.   Thanks for the quick reply!