filtering the records in a Detailsview

Craig

Well-known member
Joined
Oct 15, 2005
Messages
110
Location
United Kingdom
Programming Experience
Beginner
Detailsview not gridview


Is it possible to change what item is shown in a detailsview object from getting a value from post?

eg
if the url is detail.aspx?cat_no=0002

how can i set the detailsview to display all of 0002's details
 
Last edited:
That depends on what type of datasource you have for the details view.
If you are using one of the datasource controls (objectDataSource, SqlDataSource, AccessDataSource, ...) you can apply a querystring parameter with a related stored procedure or SQL statement with parameters.
If you are setting the datasource through code you can use either a where clause in a SQL statement or again a stored procedure with parameters.
 
Back
Top