Is there a particular reason you're using ObservableCollection? Instead you could do something like this:
namespace Medical_Representative_Project2
{
public partial class Antocids : PhoneApplicationPage
{
public Antocids()
{
InitializeComponent();
ProductsClient client = new ProductsClient();
client.getProdDetailsCompleted += new EventHandler<getProdDetailsCompletedEventArgs>(client_getProdDetailsCompleted);
client.getProdDetailsAsync();
}
private void client_getProdDetailsCompleted(object sender, getProdDetailsCompletedEventArgs e)
{
if (e.Error == null)
{
listBox1.ItemsSource = e.Result;
}
else
{
MessageBox.Show(e.Error.Message.ToString());
}
}
}
}
The above code works (at least in WPF, but should also be fine in WP7) for me. If the above does not work for you then we'll need more information in order to help. What is the error you're getting?
I agree with Oleksandr that you are best to move the web service code to the OnLoaded, although I don't think that alone would make the difference in it working or not.
Edited as I made a slip in the error check. Changed != to ==.