Share via


Adding TextBox Controls to Hold Range Parameter Values

In this section, you add two TextBox controls to provide start and end date values at runtime to the OrderDateRange range parameter in the CustomerOrders subreport.

Note

If you implement this tutorial in a Web Site, the persistence of date values that users enter into the text boxes are maintained by ViewState.

To create and configure a redisplay Button on the form

  1. Open the Web or Windows Form.
  2. From the View menu, click Designer.
  3. If you are developing a Web Site, do the following:
  4. Click between the ListBox control and the Button control.
  5. Press ENTER three times to create two rows between the ListBox control and the Button control.
  6. In the first row created below the ListBox control, type Order Start Date.
  7. In the second row created below the ListBox control, type Order End Date.
  8. If you are developing a Windows project, do the following:
  9. From the Toolbox, drag two Label controls to the right of the ListBox control. Place one label above the other, with both of them above the Button control.
  10. Select the first Label control, and then from the Properties window, set the Text property to Order Start Date.
  11. Select the second Label control, and then from the Properties window, set the Text property to Order End Date.
  12. From the Toolbox drag a control to the right of "Order Start Date."
  13. Click on the TextBox control to select it.
  14. From the Properties window, set the ID (or Name ) to orderStartDate.
  15. From the Toolbox, drag a TextBox control to the right of "Order End Date."
  16. Click on the TextBox control to select it.
  17. From the Properties window, set the ID (or Name ) to orderEndDate.
  18. From the File menu, select Save All.