Visual Web Developer SQL Query via Button

1k Views Asked by At

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

There are 1 best solutions below

1
On

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