the page. You might also want to add captions for the field names. In addition, drag the Total Records field into the header so that users are aware of how many records the search produced (total record count isn't available in the PHP server model). Figure 27.7 shows the result of the dynamic text and total field additions. Figure 27.7. Add the fields from the recordset as dynamic text. Under the ASP server model, you can also add the total number of records the search produced. [View full size image] Save your work and test the results in the browser. Figure 27.8 shows the search result when I typed the value Dorknozzle Shirt and clicked Submit. Figure 27.8. Dorknozzle Shirt was searched for and the results came back with a match. [View full size image] As you can see, the search produced a filtered result (1 record) based on the value I entered in the search text box. The results are made possible because of the variable. The variable captured the results of the request sent by the form's submission. The variable was then appended to the SQL statement, which caused the dynamic search for the object's value. Working with Parameters in ASP.NET Similar to the ASP server model, the search functionality can easily be created using ASP.NET. The difference between ASP/PHP and ASP.NET, however, lies in how we store and use the value that's coming across, appended to the URL in the address bar. As you saw in the previous section, variables are the method used for collecting, storing, and then subsequently reusing the value coming across. In the ASP.NET server model, we use parameters instead of variables. Like the variables we used in the ASP and PHP models, parameters are the mechanism used for dynamically passing and using values coming from one page to the other. Parameters in ASP.NET support the following three properties: Name: The physical name of the parameter. Type: The data type associated with the type of data being stored in the database table. Value: The value to assign the variable. This value is dynamically constructed using an intuitive Build dialog. Now that the DataSet has been created and the SQL statement has been generated, you'll want to dynamically change the value that appears just after the LIKE keyword. Essentially, that value becomes a parameter, meaning that rather than using a variable to store the value being sent across, a parameter is passed to the SQL statement dynamically. To create a new parameter for the SQL statement, follow these steps: 1. With the DataSet dialog still open in Advanced mode, add a parameter to the parameters list by selecting the Add (+) button. The Add Parameter dialog appears. 2. Type the name txtSearch in the Name text box. 3. Select the Char option from the Type menu. 4. Click the Build button. The Build Value dialog appears. 5. Make sure that the value txtSearch exists in the Name text box. 6. Choose the URL Parameter option from the Source menu. 7. Type the value abc in the Default Value text box. The formatted Build Value dialog resembles Figure 27.9. Figure 27.9. Build the parameter's value using the Build Value text box. 8. Click OK to close the Build Value dialog. The Value text box in the Edit Parameter dialog is now populated with a conditional expression similar to Figure 27.10.