title: Is it possible to initialize a Control's List<T> property in markup?
body: <p>Let's say we have the following:</p>
  
  <pre><code>public enum RenderBehaviors
  {
      A,
      B,
      C,
  }
  
  public class MyControl : Control
  {
      public List&lt;RenderBehaviors&gt; Behaviors { get; set; }
  
      protected override void Render(HtmlTextWriter writer)
      {
          // output different markup based on behaviors that are set
      }
  }
  </code></pre>
  
  <p>Is it possible to initialize the Behaviors property in the ASPX/ASCX markup? i.e.:</p>
  
  <pre><code>&lt;ns:MyControl runat="server" ID="ctl1" Behaviors="A,B,C" /&gt;
  </code></pre>
  
  <p>Subclassing is not an option in this case (the actual intent of the Behaviors is slightly different than this example). WebForms generates a parser error when I try to initialize the property in this way. The same question could be applied to other List types (int, strings).</p>