You can constrain the selection criteria using data passed into the page from the page’s URL. This is a very common way of requesting individual records to be displayed.
|
|
The URL contains the primary key value of a record in the database. Your application parses the URL parameter, extracts the primary key value, and performs the record lookup in the database. In this example, a query string called “ID” is used in the URL to convey a primary key value of “Bob Pinkston”. Bob Pinkston’s record is retrieved from the Customers table and displayed by a series of ASP.NET controls in the generated web page. |
|
|
|
Use the Add WHERE Clause dialog to select URL parameters to constrain the selection criteria by a parameter passed into the control from the page’s URL. This is a very common way of requesting individual records to be displayed. |
|
Customizing Database Queries with the Query Wizard
Using Tables and Views in WHERE Clauses
Using Constant Values in WHERE Clauses
Using URL Parameters in WHERE Clauses
Using the Logged-In User ID in WHERE Clauses
Calling Custom Code Functions in WHERE Clauses