Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating RSS with ASP.Net MVC?

How would you generate RSS using ASP.Net MVC? I have the data in the database already and I'll transform it as necessary. My first approach is to create an RSS template that I use as a view, but that seems error prone and since RSS is a structured format there could be a class that I set some properties and generates RSS. Is there such a thing? How would you do it?

like image 650
pupeno Avatar asked Jun 22 '09 23:06

pupeno


1 Answers

Here's an interesting article - http://www.developerzen.com/2009/01/11/aspnet-mvc-rss-feed-action-result/

It creates an RssActionResult class that sets the content type, and Syndication items to render the View.

like image 121
David Avatar answered Oct 14 '22 20:10

David