Velocity CTP3 Set up for ASP.NET Session State

Historically I have always viewed ASP.NET session state as "pure evil." In-proc session state is about as unreliable as you can get given that you can have timeouts, ASP.NET might recycle itself, IIS might get bounced, no scalability, and cannot work in a web farm.  SQL Session state is very resilient and works in web farm scenarios but the performance is not good and at that point you might as well be better off writing your own strongly-typed data access layer rather than blobbing everything i...


Alternate MVC Screen Navigation

Suppose you have a simple sequential screen flow in your application like this: One typical scenario for this is that each screen has its own associated Controller (for the example we'll say Controller1, Controller2, etc. but obviously they would have meaningful names in the real world).  When the user submits Screen1 then the code Controller 1 will have something like this: return this.RedirectToAction("Index", "Controller2"); In fact, each controller would have to have code like this th...


MVC RadioButtonList HTML Helper – Take 3

In two previous posts, I talked about ways to create your own HTML Helper to generate a radio button list.  In the first post [http://geekswithblogs.net/michelotti/archive/2009/08/05/mvc-radiobuttonlist-html-helper.aspx] I leveraged the FluentHtml [http://mvccontrib.codeplex.com/Wiki/View.aspx?title=FluentHtml] library to create a table layout.  In the second post [http://geekswithblogs.net/michelotti/archive/2009/08/06/mvc-radiobuttonlist-html-helper-ndash-take-2.aspx] I switched this to u...


Interesting LINQ Exercise

A co-worker posed an interesting LINQ problem to me tonight so I figured I'd share.  They had a collection of items and wanted an algorithm that would create a "collection of collections" where the first three items would be grouped together, second three items, on so on.  For example, given a sequence like this: { "a", "b", "c", "d", "e", "f", "g", "h" }, it would create a structure that contained 3 groups – the first element would be { "a", "b", "c" }, the second would be { "d", "e", "f" } and...


MVC RadioButtonList HTML Helper – Take 2

Yesterday I posted a solution [http://geekswithblogs.net/michelotti/archive/2009/08/05/mvc-radiobuttonlist-html-helper.aspx] for creating a RadioButtonList HTML helper.  But upon closer examination, I've come to the conclusion that for a horizontal flow of radio buttons, an HTML table is really not the way to go.  Perhaps a remnant from the days of web forms past. Based on a conversation I had with a co-worker [http://mo.notono.us/], HTML output like this would be much better: <div> <inp...