views:

22

answers:

2

In my asp.net 3.5 C# application I had RSS feed in some of my web pages.I am using SyndicationItem object to prepare RSS feed and using using System.ServiceModel.Syndication dll to prepare RSS page. I want them to be auto discoverable i.e The RSS feed button in IE at the browser level should get highlighted when we go to the page with RSS feed. Let me know how to do this

+1  A: 

You need to put the following meta tag into the header of your HTML page: {link rel='alternate' type='application/rss+xml' title='RSS' href='/my_rss.html'}

Replace curly brackets with angled ones to create a tag.

joekoyote
In my application I implemented RSS feed like the following http://nayyeri.net/create-rss-and-atom-feeds-with-linq-and-wcf-syndication-in-net-3-5 there its not in html format. Its xml format. Let me know how to work with this
hyma
The tag is added to HTML pages of your site. Then, when the browser comes to the site, it finds this tag and informs the user about RSS availability.
joekoyote
+1  A: 

It depends how you define auto discoverable.

If you are referring to the way a web browser will place an RSS feed icon in the address bar (like on SO) then you need to place the following code into the HEAD section of a web page the user is viewing:

 <link rel="alternate" type="application/atom+xml" title="Feed Title" href="http://rss-URL"&gt;

The code does not go in to the RSS feed. This approach will also allow search engines to find your feed.

It is also worth passing your feed via the http://validator.w3.org/feed/ as this will check it is valid and give you extra tips to ensure it is formatted in the best way.

John
Ya got ur point now.. Since I had the link in my content pages I need to access <link> tag of the master page and set its properties from the content I guess. Thanks
hyma
If this works please mark as correct (Green tick).
John