title: Updating Parameters In Data Source for a Report Viewer ASP.NET C#
body: <p>I have the following controls: Data Source, Report Viewer, and two Telerik RadDateTimePicker.
  Screen shot of what my Rad Controls look like.</p>
  
  <p><img src="https://i.stack.imgur.com/Tpwsa.jpg" alt="Rad Controls"></p>
  
  <p>My report is a client report definition (.rdlc). I have a stored procedure in my SQL 2008 database that I am using for the report, and the data source.</p>
  
  <p>I have configure with the stored procedure with the parameters source of the Rad Control, via the GUI IDE, not in code. Screen shot of that:</p>
  
  <p><img src="https://i.stack.imgur.com/IRFQZ.jpg" alt="DS Config"></p>
  
  <p>Here is the ASP code for the data source:</p>
  
  <pre><code>&lt;asp:SqlDataSource ID="DataSourceViewWeeklySummary" runat="server" 
      ConnectionString="&lt;%$ ConnectionStrings:SERVER %&gt;" 
      SelectCommand="ProcedureWeeklySummary" SelectCommandType="StoredProcedure"&gt;
      &lt;SelectParameters&gt;
          &lt;asp:ControlParameter ControlID="DTimePickerStartDate" Name="startDate" 
              PropertyName="SelectedDate" Type="DateTime" /&gt;
          &lt;asp:ControlParameter ControlID="DTimePickerEndDate" DefaultValue="" 
              Name="endDate" PropertyName="SelectedDate" Type="DateTime" /&gt;
      &lt;/SelectParameters&gt;
  &lt;/asp:SqlDataSource&gt;
  </code></pre>
  
  <p>I would like to in code, to be able to update the parameters of my data source with my two date and time pickers. Then refresh the report viewer to update the report. Can someone point me in the right direction, so that I can achieve this with little code as possible? Thanks in advance for any help. If I could list more information please let me know as well.</p>