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

LVL 2
kintonAsked:
Who is Participating?
 
Bob LearnedCommented:
Dim ConsumeWebService As New uk.co.education.www.EducationDirectRegistration
Dim ds As DataSet = ConsumeWebService.GetStatementAnswers(Username, Password, PAR1, PAR2)

Bob
0
 
kintonAuthor Commented:
It should be noted, the web service is returning the data as a dataset
0
 
kintonAuthor Commented:
ok, that seems to work, how can I pull the individual values out of that dataset?
0
 
Bob LearnedCommented:
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
0
 
kintonAuthor Commented:
That's perfect.   Thanks for the quick reply!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.