title: Passing Enum to ASCX via html markup
body: <p>I've this ASCX:</p>
  
  <pre><code>public partial class TopPhoto : UserControl
  {
  
      public TopPhotoEnum Mode { get; set; }
      public int PhotoNumber { get; set; }
  ...
  </code></pre>
  
  <p>I want to set those property via html markup like this:</p>
  
  <pre><code> &lt;uc1:TopPhoto ID="TopPhoto1" runat="server" Mode="TopPhotoEnum.Today" PhotoNumber="5" /&gt;
  </code></pre>
  
  <p><strong>update</strong></p>
  
  <pre><code>public enum TopPhotoEnum
  {
      Today,Week,Month,Year,AllTime
  }
  </code></pre>
  
  <p>but this returns me an error like this:</p>
  
  <pre><code> Impossible to create object of type 'UpVoteEntities.TopPhotoEnum' from string 'TopPhotoEnum.AllTime' property 'Mode'.
  </code></pre>
  
  <p>Is there a standard way to achieve this?</p>