Exercise 2: Query the Lists Web Service for Choice Field Options
In this exercise, you will create a Windows Phone 7 application to query the Contacts SharePoint list. You will implement the code necessary to determine what values are available for the Customer Type choice field.
Task 1 – Beginning the Exercise
In this task, you will open the lab solution in Visual Studio 2010.
Task 2 – Configuring Constants in the Windows Phone 7 Application
In this task, you will configure the constants used in the Windows Phone 7 application to work with your development environment.
Task 3 – Configuring the Reference to the SharePoint Lists.asmx Web Service
In this task, you will configure the reference to the SharePoint lists.asmx Web service. The service reference to this Web service has already been added to the project.
Task 5 – Implementing Code to Get the Contact List Choice Field Schema
In this task, you will use the SharePoint Lists Web service to determine the valid values for the Contact list ContactType field.
Task 6 – Implementing Code to Display the ContactType Field and Available Choices
In this task, you will edit the user interface to display the ContactType field in a ListBox and bind the ItemsSource to the ContactTypes collection.
Task 8 – Testing the Application
In this task, you will test the Windows Phone 7 application.