Hi,
how do i bind a xml (http://www.webservicex.net/country.asmx/GetCountries) to a dropdownlist? Currently I'm working with ASP.NET 2.0.
Greetings...
Hi,
how do i bind a xml (http://www.webservicex.net/country.asmx/GetCountries) to a dropdownlist? Currently I'm working with ASP.NET 2.0.
Greetings...
First, call your web service from code behind... Then bind xml that you get from a web service to a dropdown. On this link you have how to do that:
http://forums.asp.net/t/999571.aspx
cheers
thx Marko, finally:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim myGeoService As New net.webservicex.www.country
Dim myISOcodes As String = myGeoService.GetCountries
Dim reader As New System.IO.StringReader(myISOcodes)
If Not Page.IsPostBack Then
Dim mycountries As New DataSet
mycountries.ReadXml(reader)
DropDownList1.DataSource = mycountries
'DropDownList1.DataValueField = "value"
DropDownList1.DataTextField = "Name"
DropDownList1.DataBind()
End If
End Sub