A Closer Look at the HiddenInput Attribute in MVC 2
MVC 2 includes an attribute for model metadata called the HiddenInput attribute. The typical usage of the attribute looks like this (line #3 below): public class PersonViewModel { [HiddenInput(DisplayValue = false)] public int? Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } } So if you displayed your PersonViewModel with Html.EditorForModel() or Html.EditorFor(m => m.Id), the framework would detect the [HiddenInput] attribute metad...