Click here to Skip to main content
Click here to Skip to main content

RSS Reader Web Control

By , 23 Mar 2008
 

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:

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:

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:

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)

About the Author

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

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionSource CodememberPr@teek B@h!8 Aug '11 - 9:30 
Hi,
 
Awesome job with the custom control! It'll be great if you can send me/post the source code.
 
1. I need to modify the marquee behavior.
2. In case the control doesn't work correct for some specific content, I would like to be able to debug through the process and figure out what/why the issue occurred.
 
And as for the credit goes, it will be given to you.
 
Thanks,
 
Prateek
Rant[My vote of 1] Absolute waste of time...memberMember 41442089 Mar '10 - 2:46 
Without the source code this project is an absolute waste of time and is less than useless.
 
The reason people use this site and upload the source code is so that others can learn from it, improve it and then upload it again - thus creating a train of good code. Secondly, if you are unwilling to release the source code, but give out the dll.. (On this site) it appears that you have something malicious in the code.. Why else would you not release it here?
 
If your intention was to showcase your code, try asp.net. This site is more of a community based user group. I for one do not use ANY code without compiling the source code myself. When I create sites for customers it is absolutely required that I know what code is in the application.
 
Just a waste of everyone's time to post about a solution and not include the source code..
You get the lowest rating possible.
GeneralRe: [My vote of 1] Absolute waste of time...memberMember 41442089 Mar '10 - 3:13 
By the way...
 
If you want to keep your source code in secret squirrel mode.. You need to obfuscate it. .NET Reflector decompiled your code easy.
GeneralNice article.. But..memberdeezZ7 Dec '09 - 0:50 
Hi.
Its a nice article and very useful.
But as mentioned by others, there are the need of some modifications in the DLL for each site.
So please mail or upload the dll source.
 
Thanks.
 
Keep up the good work.
Generalgood but..memberNorberto Olazabal19 May '08 - 6:38 
With no source code is kind of useless
QuestionGreat Control!!!membervvvlad21 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]memberSuper Garrison15 Apr '08 - 11:25 
Hi M Usman
 
I like your article!
 
I want to learn more about this control that I need to set the list to a DataSet. Is that possible to email the source code?
 
Does anyone have an idea on how to set to a DataSet?
 
Thank you,
Nowlex (nowlex2000@yahoo.com)
 
modified on Wednesday, April 23, 2008 2:42 PM

Generalsource code for learn in this articlemembernhhoan12 Apr '08 - 21:13 
Hi, M Usman
Thanks you, i like this sample. I want to learn in this sample about how to create this control...
Do you share this source code.
Thanks
Hoan Nguyen
vnnhhoan@yahoo.com
GeneralRe: source code for learn in this articlememberM Usman14 Apr '08 - 0:39 
I will email the code for the article tomorrow or the next days ...
 
Muhammad Usman
Software Developer, M.sc.(Computer)

QuestionSource Code?memberDavidjwong26 Mar '08 - 14:22 
Thanks for the article, but did I miss the source code for this? I only found a dll file and an example page, no source code for the RSS reader itself.
GeneralRe: Source Code?memberM Usman27 Mar '08 - 1:56 
I included it in as a dll, Why you need the source code, do you want to modify it ?
 
Muhammad Usman
Software Developer, M.sc.(Computer)

GeneralRe: Source Code?memberDavidjwong27 Mar '08 - 12:39 
Two reasons I (and possibly other readers) would want the source code:
1, so I can learn from it. As I understand it, Code Project is essentially about sharing code rather than showcasing controls. In any case, that's why I come to the site.
2, because if I use it I very likely would want to change it. For example I think you hard-coded the width of the control which means to use it I'd have to fit my web page around it.
 
I and other readers can of course decompile the source code to get it, but why make us go through the extra step?
GeneralRe: Source Code?memberMember 278121128 Mar '08 - 3:57 
Another reason is that if I use this internally and depend on its functionality, down the road if there are any incompatibilities, bugs, etc. I need to be able to support it.
 
For example, if it doesn't work with ASP.NET 4.0, 5.0, whatever.0 and I can't find you, I need to fix it myself.
 
I may never change your source code, I just need to know that I have some recourse if I come to depend on it.
GeneralI like itmemberTorben7126 Mar '08 - 0:25 
Great article.. Keep up the good work..
 
Q: Is it possible to change the default width of the control? I have tried the "width" method it is not working. The text "More info.." can this be changed to something else? I do not want a border style on the control! How to disable?
GeneralRe: I like itmemberM Usman27 Mar '08 - 1:55 
well, you will hve to change the source code for these modifications.
 
Muhammad Usman
Software Developer, M.sc.(Computer)

GeneralGood JobmemberRai Shahid24 Mar '08 - 2:39 
you are article is very useful thanx
 
R@! Shahid (0306-4143432)

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

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 23 Mar 2008
Article Copyright 2008 by M Usman
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid