Sometimes I love C#/Visual Studio/ASP.NET. Then other times, not so much.
I wanted to create a simple RSS feed for my C#/ASP.NET site and there really wasn’t anything out there. I really don’t want to download anybody else’s binary files and I wanted something simple.
It was almost super easy. Then I got hung up on UTF-16 vs UTF-8.
So I made my own RSS class. Here it is. RSS CLASS
It’s only about 100 lines.
If you want to have an RSS Feed on a .Net web page, here’s the code for that.
protected void Page_Load(object sender, EventArgs e)
RSS rss = new RSS(“Geiger”, “http://www.jaygeiger.com”, “Geiger”, DateTime.Now.ToShortDateString());
rss.Add(“Geiger 1″, “http://www.jaygeiger.com/1″, “Geiger Description 1″, “1″);
rss.Add(“Geiger 2″, “http://www.jaygeiger.com/2″, “Geiger Description 2″, “2″);
Response.ContentType = “text/xml”;
Google LOVES blogs. So if you have a .net site, add RSS to it!