The following method for producing RSS feeds using standard asp.net data components isn't a million miles away from others documented, but I wanted to provide an easy quick start for any devs out there who get the fateful brief "oh, before we put this live can you just add an RSS feed of this data". If you've done any reading then you'll know that RSS (Really Simple Syndication) is based around a specific XML format that is well documented elsewhere. The key to simple databound RSS is to use a standard page and standard controls, but writing out XML rather than HTML markup. To make the page work as a feed you need to do the following:
HeaderTemplate: <rss version="2.0"> <channel> <title>FEED NAME</title> <link>URL THAT THE FEED WILL BE PUBLISHED TO</link> <description>DESCRIPTION OF THE FEED</description> FooterTemplate: </channel> </rss> ItemTemplate: <item> <title><%#DataBinder.Eval(Container.DataItem, "POST TITLE COLUMN")%></title> <description><%#DataBinder.Eval(Container.DataItem, "POST TEXT SUMMARY COLUMN")%></description> <link>CLICK-THROUGH URL</link> <pubdate><%#DataBinder.Eval(Container.DataItem, "ARTICLE TIMESTAMP COLUMN")%></pubdate> </item> That's all it takes - Enjoy :)
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: