title: Default value in select parameter as DateTime.Now
body: <p>I'm trying set default value of select parameter in MVC:</p>
  
  <pre><code>&lt;asp:Parameter Name="PickDate" Type="DateTime"  DefaultValue="&lt;%: DateTime.Now.ToString("yyyy-MM-dd")%&gt;" /&gt;
  </code></pre>
  
  <p>But it doesn't work... I got error":</p>
  
  <blockquote>
    <p>String was not recognized as a valid DateTime.</p>
  </blockquote>
  
  <p>Can I set <code>DateTime.Now</code> to default value?</p>
  
  <p>Edit1: Still doesn't work...</p>
  
  <pre><code>  &lt;asp:SqlDataSource ID="SqlDataSourceDailyPickingList" runat="server" 
      ConnectionString="&lt;%$ ConnectionStrings:ConnectionString %&gt;" 
      ProviderName="&lt;%$ ConnectionStrings:ConnectionString.ProviderName %&gt;" 
      SelectCommand="SELECT * FROM DailyPickingList where PickDate = @PickDate"&gt;
       &lt;SelectParameters&gt;
        &lt;asp:Parameter Name="PickDate" Type="DateTime"  DefaultValue="&lt;%: DateTime.Now%&gt;" /&gt;
      &lt;/SelectParameters&gt;
  
  &lt;/asp:SqlDataSource&gt;
  </code></pre>
  
  <p>Is it at all possible ?</p>