using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;< br>using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data .OleDb;
using System.Xml;
namespace wipe
{
///
///
public class rssnews: System.Web.UI.Page
{
public string strRSS = “”;
private void Page_Load(object sender, System.EventArgs e)
{
Response.ContentType=”application/xml”;
Response.Write(GetRSS());
}
#Region Web form designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is made by the ASP.NET Web form designer Required.
//
InitializeComponent();
base.OnInit(e);
}
///
/// the content of this method.
///
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#Endregion
public string GetRSS()
{
DB s = new DB();
string sql = “select * from news”;
DataSet ds = s .CreateDataSet(sql,”news”);
strRSS = “ “;
strRSS = “
strRSS = strRSS + “
strRSS = strRSS + “
strRSS = strRSS + “http://www.socent .com“;
strRSS = strRSS + “
for(int i = 0; i
strRSS = strRSS + “
strRSS = strRSS + “
strRSS = strRSS + “http://www.socent.com/ArticleShow@”+ds.Tables[0].Rows[i][ “id”]+”.html “;
strRSS = strRSS + “
strRSS = strRSS + “
strRSS = strRSS + “
strRSS = strRSS + “
strRSS = strRSS + “ item>“;
}
strRSS = strRSS + “
strRSS = strRSS + “
return strRSS;
}< /p>
}}