I have a weather web service that I am trying to get working on my page. I have added a web reference successfuly and am now trying to code it. It is a very simple web service that supplies me city names based on a country that I choose.
The web service exposes a function called GetCitiesByCountry. I have a list box (no particular reason why) that I want to populate with the cities. I have textbox I type the countries name in, and a button to generate the results. I have the following code in my buttons Click function:
'connect to the web service
Dim aw As weatherservice.GlobalWeather
aw = New weatherservice.GlobalWeather
txt.DataSource = aw.GetCitiesByCountry(txtCountry.Text)
txt.Visible = True
The results I get in my listbox look like this:
and it carries on vertically with the following: <Table><Country>United Kingdom</Country><City><Belfast</City> etc etc
Any ideas why?