2011-11-29 54 views
0

我需要將圖像添加到我的RSS源,但看不到它。ASPNET MVC:我如何將圖像添加到RSS項目?

我的代碼是:

 var item = new SyndicationItem 
    (
      title: Title, 
      content: Content, 
      itemAlternateLink: new Uri(bla) 
    ); 

    item.ElementExtensions.Add(
     new XElement("enclosure", 
      new XAttribute("type", "image/jpeg"), 
      new XAttribute("url", new Uri(Uri)) 
     ).CreateReader() 
    ); 

如果我使用ElementExtensions我看到一個鏈接到圖像中的RSS,但我想直接看到的圖像沒有點擊的鏈接。 這可能嗎?

+0

你看了這裏:http://stackoverflow.com/q/1076964/576752 – frennky

回答

1

你問的是如何在RSS feed中顯示圖片嗎?如果是這樣,我相信要在Feed中顯示圖像,您需要RSS媒體擴展程序 - http://video.search.yahoo.com/mrss

例如,Zenfolio使用此功能在圖庫供稿中呈現照片。