Home > Data Access in Web Forms > Selecting Information From a Database
In Displaying Information From a Database, we demonstrated samples of using ASP.NET server controls to display the results of database queries, and in brief covered how to bind list control items to a data source.
The samples presented indeed have their uses, particularly when the queries are known beforehand.
In many scenarios, though, you will need to retrieve and display specific data sets based on variable query constraints.
This document briefly steps through code examples that demonstrate dynamic queries in action, where the user decides on which records to display.
The methods described are particularly suitable when the query conditions are initially unknown.
The material covered in this section assumes some familiarity with database fundamentals and the Structured Query Language ( SQL ). And if you haven’t done so, I suggest you start with the ADO.NET Primer.
Now let’s take a closer look at how all these are done. 
Retrieving Data From User Specified Queries