Empty Result Using WebClient
hello,
i'm trying download rss feed using webclient using simple function (i'm using silverlight 2 beta 2):
private void cmdretrieve_click(object sender, routedeventargs e) {
string url = txtfeed.text;
webclient client = new webclient();
client.downloadstringcompleted += new downloadstringcompletedeventhandler(
webclient_downloadstringcompleted);
client.downloadstringasync(new uri(txtfeed.text));
}
private void webclient_downloadstringcompleted(object sender, downloadstringcompletedeventargs e) {
if (e.error == null) readfeed(e.result);
//else resultblock.text = e.error.message;
}
however, of time empty result though i'm sure uri correct, example above example work first rss feed , return empty result other 2 no apparent reason.
//txtfeed.text = @"http://rss.cnn.com/rss/cnn_showbiz.rss";
//txtfeed.text = @"http://rss.news.yahoo.com/imgrss/441";
txtfeed.text = @"http://feeds.gettyimages.com/channels/recenteditorialentertainment.rss"
thanks in advance
yehia a.salam
does these websites allow crossdomain?
Silverlight > Programming Silverlight with .NET – General
Comments
Post a Comment