Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4327094
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:29:23+00:00 2026-05-21T09:29:23+00:00

I may be going at this from the wrong direction. I’m fairly new to

  • 0

I may be going at this from the wrong direction. I’m fairly new to .net web services and was looking for a little help.

I have a geolocation webservice I got online and I wanted to bind the results to a listbox or a dataview but am unable too.

I’ve created a web proxy called net.webservicex.www that points to the webservice at.. http://www.webservicex.net/geoipservice.asmx

Here’s my c# code.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace web_services
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            net.webservicex.www.GeoIPService myProxy = new net.webservicex.www.GeoIPService(); // proxy object
            string ipAddress, result;

            ipAddress = txtIpAddress.Text;

            result = myProxy.GetGeoIP("64.106.166.130");
            lstResults.DataSource = result;
            lstResults.DataMember = "IP";

        }
    }
}

The error I’m recieving is Error

Cannot implicitly convert type ‘web_services.net.webservicex.www.GeoIP’ to ‘string’ at line 24

If someone could give me some tips or idea’s that would be great.

Thanks!
Paul

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T09:29:24+00:00Added an answer on May 21, 2026 at 9:29 am


    You don’t need to put it in the result string

    lstResults.DataSource = myProxy.GetGeoIP("64.106.166.130");
    

    Since the object returned by your webservice is not enumerable, You could trick it by putting it into an a enumerable Type:

    List<web_services.net.webservicex.www.GeoIP> resultList = new List<web_services.net.webservicex.www.GeoIP>();
    resultList.Add(myProxy.GetGeoIP("64.106.166.130"));
    lstResults.DataSource = resultList;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Python so I may be going about this completely wrong, but
This problem may be a little broad, but I'm going to go ahead and
I may be going about this the wrong way, so I'll set out the
This may be super simple - but I'm struggling to spot what's going on.
I am going to create a web site or you may call it a
Simple question, the answer may not be... I'm going to be developing a web
I might be going in the wrong direction, so let me try to sort
I wonder whether someone may be able to help me please. From some demos
Perhaps I am going about this wrong, but I am following git tutorials as
May I know how could I pass the value of driver from code behind

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.