title: How to detect in code if property is decorated with HiddenInput
body: <p>I have a view where I need to detect if a property is decorated with hidden input.</p>
  
  <p>My property is defined as:</p>
  
  <pre><code>[HiddenInput(DisplayValue = false)]
  public string UserName{ get; set; }
  </code></pre>
  
  <p>My attempt so far has been:</p>
  
  <pre><code>var column.Member = "UserName";
  
  if (ViewData.ModelMetadata.HideSurroundingHtml == true &amp;&amp; 
        ViewData.Values.Contains(column.Member))
  {                          
    column.Visible = false;
  }
  </code></pre>
  
  <p>I have read that I might be able to use "HideSurroundingHtml" to determine if the property should not be displayed.</p>
  
  <p>Any ideas how to detect this?</p>