MVC Razor Boolean EditorTemplate With Bootstrap Formatting

EDITOR NOTE: This approach is obsolete since the release of Bootstrap v3. See this post for more details.

The bootstrap btn-group "toggle" functionality is quite nice and very intuitive. Here is an EditorTemplate for MVC that will format all boolean model fields as Bootstrap button groups. (more…)