Archive for October, 2009
RssResult – An ASP.NET MVC RSS ActionResult
One of the most common tasks for data serving websites is offering an RSS feed that users can subscribe to in order to keep up with the latest updates to that data. Previously I posted the article Creating a simple RSS feed using ASP.NET MVC which demonstrated how to create an RSS feed in a [...]
C# boolean to string extension method
One of the most common operations I find myself repeating when programming is writing a boolean value in a human friendly form. Most users, unless geeky and appreciative of the coolness of datatypes, will not be too comfortable with true/false being used in yes/no context. I’m a BIG believer in developing my own reusable code [...]
CSS class property in ASP.NET MVC HtmlAttributes
When adding an ActionLink or using a similar Html helper on your C# ASP.NET MVC views you will on occasions want to pass a css class via the htmlAttributes parameter. As this is normally achieved by creating an anonymous type you may expect the following code snippet to work. 1 <%= Html.ActionLink("My Link", "MyLink", null, [...]
Creating a simple RSS feed using ASP.NET MVC
Looking to serve an rss document via your ASP.NET MVC controller? Here is a simple, quick means to do so. If you are looking for a much neater, smarter, reusable method of serving rss from your controllers check out my ASP.NET MVC RssResult post (coming soon). For the demonstrations below I will be using a [...]