Click here to Skip to main content
15,861,172 members
Articles / Web Development / ASP.NET

RSS Reader Web Control

Rate me:
Please Sign up or sign in to vote.
3.61/5 (14 votes)
23 Mar 2008CPOL3 min read 93.8K   554   39   16
A simple to use, scrolling news reader web control

Introduction

RSS (Really Simple Syndication) Feeds are becoming very popular these days. People need Country News at their own commercial websites. Today the most powerful websites are being developed in ASP.NET due to the fact that ASP.NET provides Web Controls that enable the Software Reuse property of Software Engineering Models. RSS Reader Control may be just dragged and dropped on web forms, can be linked to an RSS Feed and it will display a smooth, cool, and scrolling interface to the Feeds.

Background

The main power behind creation of such feeds is XML (Extensible Markup Language). XML is a structured language, thus provides support for the structured sharing of data. XML documents are built under a specific format. An example of such a document is as follows:

Image 1

RSS Feeds work in the same way. Today News Agencies update a specific document on a daily basis. The same document is provided an interface in the websites. So the websites always have the latest contents of news. Obviously the creation of such documents is not easy as far as their property of being case-sensitive is concerned. Today, there are many XML editors available in the market. The structure of RSS Feeds is a standard and is unique around the world. A sample RSS Feed looks like this:

Image 2

A detailed description on RSS can be found here.

RSS Reader provides an interface to such a document. It extracts the XML from the specific documents, implies the scrolling effects to the contents read.

Using the Code

To use RSS Reader, you will need to add RSS Reader to your tool box by locating the RSSReader.dll. Once RSS Reader is in your tool box, you will need to drag it to the page. You will also need to provide the URL where to fetch news from. Different CSS classes may also be applied for a good interface of the control. Since the header, content area, and footer are purely editable and styleable, you will have the option to design the control to your requirements and likings. The list of properties is as follows:

  • HeaderText: The Text to appear as the control title, e.g. Country News
  • HeaderCssClass: The CSS Class to apply on Header
  • RSSHeading: The Text to appear as heading for the news inside the control, e.g. News
  • RSSHeadingCssClass: The CSS Class to apply on news heading
  • RSSNewsCSSClass: The CSS Class to apply on the contents of news
  • FooterText: The Text to appear in the footer of the control. e.g. News from http://www.thenews.com.pk
  • FooterCssClass: The CSS Class to apply on the footer of the control

After setting the properties, the control will look like this:

Image 3

Points of Interest

Since the XML document is the data source for the control, it should be in the standard format, so that the control is able to read the contents. The Case Sensitivity of XML may also be of a great concern.

History

  • 23rd March, 2008: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Marriala Technologies
Pakistan Pakistan
Muhammad Usman
Software Developer, M.sc(Computer)
Pakistan

Comments and Discussions

 
QuestionSource Code Pin
Pr@teek B@h!8-Aug-11 9:30
Pr@teek B@h!8-Aug-11 9:30 
Rant[My vote of 1] Absolute waste of time... Pin
Member 41442089-Mar-10 2:46
Member 41442089-Mar-10 2:46 
GeneralRe: [My vote of 1] Absolute waste of time... Pin
Member 41442089-Mar-10 3:13
Member 41442089-Mar-10 3:13 
GeneralNice article.. But.. Pin
deezZ7-Dec-09 0:50
deezZ7-Dec-09 0:50 
Generalgood but.. Pin
Norberto Olazabal19-May-08 6:38
Norberto Olazabal19-May-08 6:38 
QuestionGreat Control!!! Pin
vvvlad21-Apr-08 22:45
vvvlad21-Apr-08 22:45 
Hi Muhammad!
For a long time now I'm looking for a nice example of rss reader code.
Could you please email the source to me so I will be able to learn from it?
My mail is vvvlad42@yahoo.com

Thanks in advance
QuestionSource code & how to set to a DataSet? [modified] Pin
Super Garrison15-Apr-08 11:25
Super Garrison15-Apr-08 11:25 
Generalsource code for learn in this article Pin
nhhoan12-Apr-08 21:13
nhhoan12-Apr-08 21:13 
GeneralRe: source code for learn in this article Pin
M Usman14-Apr-08 0:39
M Usman14-Apr-08 0:39 
QuestionSource Code? Pin
Davidjwong26-Mar-08 14:22
Davidjwong26-Mar-08 14:22 
GeneralRe: Source Code? Pin
M Usman27-Mar-08 1:56
M Usman27-Mar-08 1:56 
GeneralRe: Source Code? Pin
Davidjwong27-Mar-08 12:39
Davidjwong27-Mar-08 12:39 
GeneralRe: Source Code? Pin
JJJX28-Mar-08 3:57
JJJX28-Mar-08 3:57 
GeneralI like it Pin
Torben7126-Mar-08 0:25
Torben7126-Mar-08 0:25 
GeneralRe: I like it Pin
M Usman27-Mar-08 1:55
M Usman27-Mar-08 1:55 
GeneralGood Job Pin
Rai Shahid24-Mar-08 2:39
Rai Shahid24-Mar-08 2:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.