(+N) Consulting Inc.

Consulting | Software Solutions | Training

MVC Radio Button List

As predicted, I came around to using some radio  buttons. As you might guess by now, I didn't like the HTML or the implementation in the current MVC release. As you may expect, I wrote my own :-) The implementation is fairly simple and straightforward. It extends System.Web.MVC.ViewPage, takes a list of objects, allows for selection of one of the radio buttons, supports orientation and supports selection of both the value the radio button submits and the display string for that item independently. 1: using System; 2: using System.Collections.Generic; 3: using System.Linq.Expressions; 4: using System.Web.Mvc; 5: using System.Web.UI; 6:  7: public static partial... [More]