tags:

views:

14

answers:

1

I am creating a web site using Visual Web Developer 2010. I currently have a datasource that gets its information from the Access database that has been added into the APP_Data section. 1) How would I run a query by using a button that been placed on the website.

2) How would I display the result of that query into a datagridview or some other data control?

+1  A: 

You can add a gridview to the form and then configure the access data source to use a where clause to select rows. Then just choose the textbox control you want to get the value from and add a button to do a post-back, which will run the query.

If you need more help with this let me know, I've got a working sample.

alt text

Carl Weis
Make sure you supply a default value to search for. It will use this to load the initial set of data. That way your not loading the whole database at once.
Carl Weis