Filtering Database Rows
The SqlDataSource
control includes a FilterExpression
property that enables you to filter the rows returned by the control. You can define complex Boolean filters that include parameters with this property.
For example, the page in Listing 9.10 retrieves all movies that have titles that match the string entered into the TextBox
control (see Figure 9.6).
Figure 9.6. Show matching movies.
Listing 9.10. ShowFilterExpression.aspx
In Listing 9.10, the FilterExpression
includes the LIKE
operator and the %
wildcard character. ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.