<p>Is there any way to apply an attribute to a model file in ASP.NET Dynamic Data to hide the column?</p>

<p>For instance, I can currently set the display name of a column like this:</p>

<pre><code>[DisplayName("Last name")]
public object Last_name { get; set; }
</code></pre>

<p>Is there a similar way to hide a column?</p>

<p><strong>Edit</strong>: Many thanks to Christian Hagelid for going the extra mile and giving a spot-on answer :-)</p>

[{'answer_id': 25667, 'author': 'Christian Hagelid', 'author_id': 202, 'author_profile': 'https://Stackoverflow.com/users/202', 'pm_score': 5, 'selected': True, 'text': '<p>Had no idea what ASP.NET Dynamic Data was so you promted me to so some research :)</p>\n\n<p>Looks like the property you are looking for is </p>\n\n<pre><code>[ScaffoldColumn(false)]\n</code></pre>\n\n<p>There is also a similar property for tables</p>\n\n<pre><code>[ScaffoldTable(false)]\n</code></pre>\n\n<p><a href="http://davidhayden.com/blog/dave/archive/2008/05/15/DynamicDataWebsitesScaffoldTableScaffoldColumnAttributes.aspx" rel="noreferrer">source</a></p>\n'}, {'answer_id': 5600552, 'author': 'sorgfelt', 'author_id': 699328, 'author_profile': 'https://Stackoverflow.com/users/699328', 'pm_score': 0, 'selected': False, 'text': '<p>A much, much easier method: If you want to only show certain columns in the List page, but all or others in the Details, etc. pages, see <a href="https://stackoverflow.com/questions/80175/how-do-i-hide-a-column-only-on-the-list-page-in-asp-net-dynamic-data">How do I hide a column only on the list page in ASP.NET Dynamic Data?</a></p>\n\n<p>Simply set AutoGenerateColumns="false" in the GridView control, then define exactly the columns you want:</p>\n\n<p>&lt;Columns><br/>\n    ...<br/>\n    &lt;asp:DynamicField DataField="FirstName" HeaderText="First Name" /><br/>\n    &lt;asp:DynamicField DataField="LastName" HeaderText="Last Name" /><br/>\n&lt;/Columns></p>\n'}]
['https://Stackoverflow.com/questions/25653', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/364/']