Error faced when trying to retieve data to listpicker using web service.
Hi everyone, please do me a favour here. I'm new to c# for windows phone 7.
I'm using web service to retrieve data from linq to sql and display in my listpicker. Whenever i run the application, the error will point to "listPickerEstate.ItemsSource = e.Result;", which is in my xaml.cs .
The error message will be:
ArgumentOutOfRangeException was unhandled
Troubleshooting tips:
Make sure the arguments to this method have valid values.
If you are working with a collection, make sure the index is less than the size of the collection.
When using the overload two-argument FindString or FindExactString methods with a ComboBox or ListBox,check the startIndex parameter.
-----------------------------------------------------------------------------------------------------------------------------------------------
Codes in xaml.cs
public Settings()
{
// create AppSettings instance
appSettings = new AppSettings();
InitializeComponent();
ServiceImplClient varEstates = new ServiceImplClient();
varEstates.GetEstatesNameCompleted +=new EventHandler<GetEstatesNameCompletedEventArgs>(varEstates_GetEstatesNameCompleted);
varEstates.GetEstatesNameAsync()
}
void varEstates_GetEstatesNameCompleted(object sender, GetEstatesNameCompletedEventArgs e)Sorry for the mess. I seems to arrange the codes neatly. I'm stucked in this coding for very long. Please help me.
{
listPickerEstate.ItemsSource = e.Result;