Icons on SyndicationItem
First we create the SyndicationFeed object and read XML data from a feed at the address FeedUri:
Dim SyndFeed As SyndicationFeed = SyndicationFeed.Load(System.Xml.XmlReader.Create(FeedUri))
Then we create a temporary repository for the SyndicationItem objects and populate it:
Dim TempItems As New List(Of SyndicationItem)TempItems.AddRange(SyndFeed.Items.ToList.GetRange(0, 10))
For Each CurrItem As SyndicationItem In TempItems
CurrItem.ElementExtensions.Add("favico", "", IconUri)
Next
In the aspx page we can access the image with the code:
<img src='<%#CType(Container.DataItem, SyndicationItem).ElementExtensions.ReadElementExtensions(Of String)("favico", "").Item(0).ToString%>' height="16" />
Written by Luca Mauri
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vb.net
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#