title: selecting data between 2 dates
body: <p>I am Working in ASP.NET and SqlServer.</p>
  
  <p>I have two textboxes with <strong>calender extender</strong> in my application where user will select two dates.I want to get data between those two dates from sqlserver where my datatype for that particular field is <strong>DateTime</strong>. please tell me how to proceed with this ...I wrote a query but thats not working..</p>
  
  <p>my query:</p>
  
  <pre><code>  SqlCommand cmd = new SqlCommand("select top 1 OrderNumber from tblOrderMaster where OrderedDate&gt;='" + txtfromcal.Text + "' and OrderedDate&lt;='" + txttocal.Text + "' ", conn);
  </code></pre>