locked
How to get data from XML Web Service RRS feed

  • Question

  • I want to use web service for my application. There are  one textbox and two dropdownlist. And I want to fill the dropdownlist from this webservice. But I still dont understand how to get the data. Help please..

     

    I use webservice from http://www.webservicex.net/WS/WSDetails.aspx?WSID=23&CATID=13

     

    Thank you.

    • Moved by Chao Kuo Wednesday, November 10, 2010 7:55 AM (From:Visual Basic General)
    Thursday, November 4, 2010 2:26 AM

All replies

  • Helllo, Friends

    I think this forum is better for your question.

    http://forums.asp.net/28.aspx

    Thanks

    Chao


    Please unmark it if it does not help, and mark it if it helps.
    Monday, November 8, 2010 2:58 AM
  • I assume you want to get the weight types bound to your drop down lists?

    Try this:

      Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
          Dim xE As XElement = XElement.Load("http://www.webservicex.net/ConvertWeight.asmx?WSDL")
          Dim q = From weight In xE.Descendants
              Where weight.Name.ToString.EndsWith("enumeration") AndAlso weight.Parent.Parent.@name = "WeightUnit"
              Select weight
    
          For Each weight In q
            DropDownList1.Items.Add(New ListItem(weight, weight))
          Next
        End If
      End Sub
    
    Monday, November 8, 2010 4:53 AM
  • I have tried,, but the dropdownlist is still empty.
    Friday, November 12, 2010 3:28 AM