2014-12-04 87 views
1

調用php webservice這是我的代碼,我不想在Windows Phone應用程序中調用webservice。無法通過參數

client.DownloadStringAsync(new Uri("http://example.com/get_places_nearby.php?longitude="+itravelObj.getGPSLongitude()+"&latitude="+itravelObj.getGPSLatitude(), UriKind.Relative)); 

幫助,請..

回答

0

想你需要更改URI到UriKind.RelativeUriKind.Absolute

client.DownloadStringAsync(new Uri("http://example.com/get_places_nearby.php? 
    longitude="+itravelObj.getGPSLongitude()+"&latitude="+itravelObj.getGPSLatitude(), 
    UriKind.Relative)); 

因爲你開始http://www.website.com