Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » Samples » Downloads
 
Add your own
alternative version

A very standard, powerful and easy to use Sample and Library for working on RSS 2.0

, 18 Feb 2005 MIT
With this library, you can easily create some RSS 2.0 files for your site and/or use some RSS 2.0 files from other sites into your site.
namespace working_on_rss
{
	public class create_rss2_sample2 : System.Web.UI.Page
	{
		#region Web Form Designer generated code
		override protected void OnInit(System.EventArgs e)
		{
			InitializeComponent();
			base.OnInit(e);
		}

		private void InitializeComponent()
		{
			this.Load += new System.EventHandler(this.Page_Load);
		}
		#endregion

		private void Page_Load(object sender, System.EventArgs e)
		{
			IranianExperts.RSS.RSSChannel oRSSChannel = new IranianExperts.RSS.RSSChannel("Channel Title", "Channel Link", "Channel Description");
			oRSSChannel.PubDate = System.DateTime.Now.ToString();

			IranianExperts.RSS.RSSImage oRSSImage = new IranianExperts.RSS.RSSImage("http://www.site.com/images/banner.gif", "http://www.IranianExperts.com", "Iranian Experts");

			IranianExperts.RSS.RSSRoot oRSSRoot = new IranianExperts.RSS.RSSRoot(oRSSChannel, oRSSImage, Response.OutputStream);

			IranianExperts.RSS.RSSItem oRSSItem = null;

			oRSSItem = new IranianExperts.RSS.RSSItem("Item 1", "http://www.Item1.com");
			oRSSItem.PubDate = System.DateTime.Now.ToString();
			oRSSRoot.Items.Add(oRSSItem);

			oRSSRoot.Items.Add("Item 2");

			oRSSRoot.Items.Add("Item 3", "http://www.Item3.com");

			Response.Clear();
			Response.ContentEncoding = System.Text.Encoding.UTF8;
			Response.ContentType = "text/xml";
			IranianExperts.RSS.RSSUtilities.PublishRSS(oRSSRoot);
			Response.End();
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License

Share

About the Author

Dariush Tasdighi
Web Developer Sematec Ins.
Iran (Islamic Republic Of) Iran (Islamic Republic Of)
My experiences are:
 
HTML 5.0, CSS 3.0
JQuery, Angular JS, Bootstrap
 
MVC 5.0, WEB API, c#
 
My Site URLs:
http://www.IranianExperts.ir
http://www.IranianExperts.com
 
My Yahoo Group URL: http://groups.yahoo.com/group/iranianexperts
 
Mobile: 0098-912-108-7461
Address: Tehran, Tehran, Iran

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141216.1 | Last Updated 18 Feb 2005
Article Copyright 2005 by Dariush Tasdighi
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid