If I understand the [ScaffoldColumn(false)] attribute correctly, I should be able to decorate a variable with this and then, when I create a strongly-typed Edit view, that field will show up as hidden text and NOT a Label/Textbox pair.
I am using entity framework and then adding a partial class with an inner metadata class like so:
[MetadataType(typeof(AlumniInterest_Metadata))]
public partial class AlumniInterest
{
private class AlumniInterest_Metadata
{
[ScaffoldColumn(false)]
[DisplayName("Person Id")]
[StringLength(8)]
public object person_id { get; set; }
[DisplayName("Interest")]
[StringLength(35)]
public string interest_desc { get; set; }
}
}
This partial is in the same namespace as the EF generated class and the DisplayName attribute IS being picked up so I think things are wired correctly. I tried changing the type from string to object (based on some google search results) but that did nothing.
Anyone else run into this problem? Have I made a newb error?