title: Is it possible to create conditional attribute as DisplayIf?
body: <p>I want to create an attribute to use with my viewmodel. I want to display different textstrings depending on a third value.</p>
  
  <p>I would like to do something like this...</p>
  
  <pre><code>[DisplayIf("IsPropertyValid", true, Name="value 1")]
  [DisplayIf("IsPropertyValid", false, Name="value 2")]
  public string MyProperty { get; set; }
  
  public bool IsPropertyValid { get; set; }
  </code></pre>
  
  <p>Depending on whether my value IsPropertyValid is true or not I want to show one or the other. Ie. When property IspPropertyValid equals true "value 1" will be the displaytext and if not it will be "value 2".</p>
  
  <p>Is this possible with ASPNET.MVC attributes? Or even better... a combinated one like....</p>
  
  <pre><code>[DisplayIf("IsPropertyValid", new {"value 1", "value 2"})].
  public string MyProperty { get; set; }
  
  public bool IsPropertyValid { get; set; }
  </code></pre>
  
  <p>Then the attribute checks the value of IsPropertyValid and makes sure the value displayed is "value 1" or "value 2".</p>