This article mainly provides code to create your own RSS for others to subscribe to ...
---rss.aspx<%@ page language= "C #" codebehind= "RSS.aspx.cs" autoeventwireup= "false" inherits= "Socent.rss"%>--- RSS.aspx.csusing system;using system.collections;using system.componentmodel;using system.data;using System.Drawing ; using system.web;using system.web.sessionstate;using system.web.ui;using system.web.ui.webcontrols;using System.web.ui.htmlcontrols;namespace socent{//<summary>///</summary> public class Rss:syste m.web.ui.page {Components.genrss gr = new Components.genrss ();//Instantiation of object string strrss = ""; private void Page_Load (object sender, System.EventArgs e) {Response.ContentType = "application/xml";//output and display as XML data Response.Write (Getrss ()); }///<summary>///Get aggregated articles///</summary> public string Getrss () {DataSet ds = gr. Generaterss (); Call the Generaterss () method to get data Strrss = Strrss + "<rss version=\" 2.0\ ">"; Strrss = Strrss + "<channel>"; Strrss = Strrss + "<title> Aborigines manufacturing </title>";Strrss = Strrss + "<link>http://www.socent.com</link>"; Strrss = Strrss + "<description> Aborigines manufacturing </description>"; for (int i = 0; I < ds. Tables[0]. Rows.Count; i++) {Strrss = Strrss + "<item>"; Strrss = Strrss + "<title><! [cdata[] +ds. Tables[0]. rows[i]["Title"]+ "]]></title>"; Strrss = Strrss + "<link>http://www.socent.com/articleshow@" +ds. Tables[0]. rows[i]["ID"]+ ".html</link>"; Strrss = Strrss + "<description><! [cdata[] +ds. Tables[0]. rows[i]["Description"]+ "]]></description>"; Strrss = Strrss + "<copyright> Aborigines manufacturing </copyright>"; Strrss = Strrss + "<pubDate>" +convert.todatetime (ds. Tables[0]. rows[i]["Adddate"]. ToString ()). ToString ("Yyyy-mm-dd hh:mm") + "</pubDate>"; Strrss = Strrss + "<comments>http://www.socent.com/commentshow@" +ds. Tables[0]. rows[i]["ID"]+ ".html</comments>"; Strrss = Strrss + "</item>"; } Strrss = Strrss + "</channel>";Strrss = Strrss + "</rss>"; return strrss; #region The Web Forms Designer generated code override protected void OnInit (EventArgs e) {/////CODEGEN: This call is required by the ASP. InitializeComponent (); Base. OnInit (e); }//<summary>///designer supports the required method-do not use the Code Editor to modify///The contents of this method. </summary> private void InitializeComponent () {this. Load + = new System.EventHandler (this. Page_Load); } #endregion}}