title: Passing a string to SelectParameter function asp.net web page
body: <p>So it has been a very long time since I wrote an ASP page. In fact it was Classic ASP and now I am struggling to catch up with the new .NET version.</p>
  
  <p>My issue, I want to search a database for rows that are for the current week only. It should show rows from Mon thru Fri of the current week no matter what day of the current week I am viewing the page.</p>
  
  <p>I began with the below code which gives me the two dates to insert into my <code>SqlDataSource</code> "Where" string.</p>
  
  <pre><code>  Dim Mon As DateTime
    Dim Fri As DateTime
    Dim daysDiff As Integer
    daysDiff = 2 - Weekday(DateTime.Today)
    Mon = DateAdd("d", daysDiff, DateTime.Today)
    Fri = DateAdd("d", 4, Mon)
  </code></pre>
  
  <p>Now my issue is I don't know how to grab the values of "Mon" and "Fri" to insert it into the ASP:SqlDataSource SelectCommand function</p>
  
  <pre><code>SelectCommand = "SELECT * FROM [Concerts] WHERE ShowDate &gt;= MON AND ShowDate &lt;= Fri" &gt;
  </code></pre>
  
  <p>I need it to resolve into:</p>
  
  <pre><code>SelectCommand = "SELECT * From [Concerts] WHERE ShowDate &gt;= 09/12/2011 AND ShowDate &lt;= 09/16/2011"&gt; 
  </code></pre>
  
  <p>Your help is appreciated as I have been at this for a couple of days trying to get through this one thing which should be fairly simple to you experts out there.</p>