Question

I am trying to get a listview selected item to work. I am trying to see if I can pass the selected value to a wcf and query the database from a selected county to a town. I am just wondering how I can do this?

Here is my onitem click event that I am building at the minute:

public void OnItemClick(AdapterView parent, View view, int position, long id)
{
  var selectedValue = parent.GetItemAtPosition(position);
  var Intent = new Intent(this, typeof(SelectLocationActivity));
  // selectedValue should already be a string but...
  Intent.PutExtra("Name", selectedValue.ToString());
  StartActivity(Intent);
}

I am just wondering how I can implement the calling of the wcf service app and post the selected value to it. I am using Xamarin by the way

Was it helpful?

Solution

If you have set up your webservice, then just add a Service Reference in your project and all the exposed functions of your ws will be available through the proxy class which will be created when you added the reference.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top