This article mainly provides code, create its own RSS, to subscribe to others ...
Rss.aspx
<%
@ Page Language
=
"
C #
"
Codebehind
=
"
Rss.aspx.cs
"
Autoeventwireup
=
"
False
"
Inherits
=
"
Socent.RSS
"
%>
Rss.aspx.cs
Using
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
{/ ** //// /// acquisition aggregate article /// summary> public class RSS: system.web.ui.page {components.genrss gr = new components.genRSS (); // Instantiate the object strrrss = "" "; private void page_load (object sender, system.eventargs e) {response.contentType =" Application / XML "; // output and press XML data to display response.write (GETRSS ());} / ** //// /// acquisition aggregate article /// summary> public string getrss () {DataSet DS = gr.generatd (); // Call the generatd () method, get the data strrss = STRRSS ""; strrs = strrss ""; strrs = strrs Totter Manufacturing title> "; strrs = strrs Http://www.socent.com link> "; strrs = strrs Toleracant manufacturing description>"; for (int i = 0; i "; strrs = strrs title> "; strrs = strrs http://www.socent.com/articleshow@" ds.tables [0] .rows [i] ["id"] ".html < / LINK> "; STRRSS = STRRSS " description>"; strrs = strrs Tank Manufacturing Copyright> "; strrs = strrss " " convert.todatetime (ds.tables [0] .ROWS [i] [" adddate "]. TOSTRING ()). Tostring ("
YYYY-MM-DD HH: MM ") " pubdate> "; strrs = strrs http://www.socent.com/commentshow@" DS.Tables [0] .rows [i ] ["ID"] ". Html comments>"; strrs = strrss " item>";} strrss = strrss channel> "; strrs = strrss r r Return Strrs;} Web Form Designer Generated Code #Region Web Form Designer Generated Code Override Protected Void OnInit (Eventargs E) {// // Codegen: This call is necessary for the ASP.NET Web Form Designer } //Init (e);} / ** //// /// Designer supports the required method - Do not use the code editor to modify // this method . /// summary> Private void initialization () {this.load = new system.eventhandler (this.page_load);} #ENDREGON}} from: