As Nicholas says, RSS is simple enough and you can create an RSS feed
easily.
It should be a XML response to an HTTP request and I format only the last 10
entries in my feeds and expect the RSS reader to cache the entries it has
seen. If you turn the RSS reader off for a period of time longer than the
distribution rate you're probably not going to be vastly interested in the
"news" anyway.
After my signature is a listing for a simple RSS feed provider that I use on
one of my sites... It's quick and dirty but it seems to work fine.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
/// <summary>
/// Summary description for rss.
/// </summary>
public class rss : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
protected override void Render(HtmlTextWriter writer)
{
this.Response.ContentType="application/xml";
OleDbConnection cnx=new
OleDbConnection(Constants.NEWSConnectionString(Ser ver));
OleDbCommand cmd=new OleDbCommand(@"SELECT TOP 10 newsitems.newsitemid,
newsitems.date, newsitems.title, newsitems.description
FROM newsitems
ORDER BY newsitems.date DESC;
",cnx);
cnx.Open();
OleDbDataReader rdr=cmd.ExecuteReader();
writer.WriteLine("<?xml version=\"1.0\"?>");
writer.WriteLine("<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS
0.91//EN\" \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">");
writer.WriteLine(" <rss version=\"0.91\">");
writer.WriteLine(" <channel>");
writer.WriteLine(" <!-- Channel Information -->");
writer.WriteLine(" <title>Your newsfeed title goes here</title>");
writer.WriteLine(" <link>http://www.yourlink.com</link>");
writer.WriteLine(" <description>This is some blurb</description>");
writer.WriteLine(" <language>en-us</language>");
if(rdr.HasRows)
{
while(rdr.Read())
{
writer.WriteLine(" <!-- Item details -->");
writer.WriteLine(" <item>");
writer.WriteLine(string.Format("
<title>{0}</title>",rdr["title"].ToString()));
writer.WriteLine(string.Format("
<description>{0}</description>",rdr["description"].ToString()));
writer.WriteLine(string.Format("
<link>{0}?item={1}</link>",Constants.NewsContentUrl,
rdr["newsitemid"].ToString()));
writer.WriteLine(" </item>");
writer.WriteLine(" <!-- End Item details -->");
}
}
writer.WriteLine(" </channel>");
writer.WriteLine(" </rss>");
writer.Flush();
}
<ja*@gloryfish.org> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hello all,
I'd like to probe the community for some insight, if I may. I am in the
planning stages of developing an XML generator for my workplace.
Our site has an internal news system which stores news items as
database entries. Our head organization has requested that all branches
make an rss or xml file available for syndication on their central news
site. I'm curious as to what plan of attack would be best suited for
this application.
I'm working in VS.NET 2003, Windows 2000, SQL Server 2000.
Web service, ASPNET page? How about caching? Any thoughts or insights
would be helpful. Thanks for your time! :)
-Jay