Skip to content

Instantly share code, notes, and snippets.

@ChuckBryan
Last active August 29, 2015 14:03
Show Gist options
  • Save ChuckBryan/7ac6adb52a9b2b1d3558 to your computer and use it in GitHub Desktop.
Save ChuckBryan/7ac6adb52a9b2b1d3558 to your computer and use it in GitHub Desktop.
/*Note: if you don't make the model Boolean, you will get errors on Create Actions where you might not initially new up a model.*/
@model Boolean?
<label>
@Html.CheckBox("", Model.HasValue && Model.Value) @ViewData.ModelMetadata.DisplayName
</label>
@ChuckBryan
Copy link
Author

This is my implementation of a boolean editor using the framework that Matt Honeycutt set up for FailTracker that was demonstrated in his Pluralsight Video.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment